Skip to content

Commit 710d364

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: add missing return type declaration Modernize func_get_args() calls to variadic parameters Use a lazyintertor to close files descriptors when no longer used
2 parents 262d033 + 715e7a5 commit 710d364

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Filesystem.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,14 +717,16 @@ private function getSchemeAndHierarchy(string $filename): array
717717
}
718718

719719
/**
720+
* @param mixed ...$args
721+
*
720722
* @return mixed
721723
*/
722-
private static function box(callable $func)
724+
private static function box(callable $func, ...$args)
723725
{
724726
self::$lastError = null;
725727
set_error_handler(__CLASS__.'::handleError');
726728
try {
727-
$result = $func(...\array_slice(\func_get_args(), 1));
729+
$result = $func(...$args);
728730
restore_error_handler();
729731

730732
return $result;

0 commit comments

Comments
 (0)