Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67d0658

Browse files
committed
Set default value of method args
1 parent d542462 commit 67d0658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/reflection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function get_method($object, string $method_name): \Closure {
130130
*
131131
* @return mixed The value returned by the function
132132
*/
133-
public static function call_method($object, string $method_name, array $args) {
133+
public static function call_method($object, string $method_name, array $args = []) {
134134
return self::get_method($object, $method_name)(...$args);
135135
}
136136

0 commit comments

Comments
 (0)