Skip to content

Commit b84b3a9

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: 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 4b48008 + 710d364 commit b84b3a9

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
@@ -736,14 +736,16 @@ private function getSchemeAndHierarchy(string $filename): array
736736
}
737737

738738
/**
739+
* @param mixed ...$args
740+
*
739741
* @return mixed
740742
*/
741-
private static function box(callable $func)
743+
private static function box(callable $func, ...$args)
742744
{
743745
self::$lastError = null;
744746
set_error_handler(__CLASS__.'::handleError');
745747
try {
746-
$result = $func(...\array_slice(\func_get_args(), 1));
748+
$result = $func(...$args);
747749
restore_error_handler();
748750

749751
return $result;

0 commit comments

Comments
 (0)