You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 121 of LoggerFactory: return call_user_func_array(array($reflection, 'newInstance'), array_values($options));
Results in an error Uncaught Error: Unknown named parameter $path in /var/www/html/vendor/neeckeloo/monolog-module/src/Factory/LoggerFactory.php on line 121.
This is because in PHP8 call_user_func_array passes the $options array as named parameters if it has named keys.
Using array_values() to return a numerically keyed array would fix the issue as the options would then be passed positionaly just as they are in PHP7 and this would maintain both PHP7 and PHP8 compatibility.
On line 121 of LoggerFactory:
return call_user_func_array(array($reflection, 'newInstance'), array_values($options));
Results in an error
Uncaught Error: Unknown named parameter $path in /var/www/html/vendor/neeckeloo/monolog-module/src/Factory/LoggerFactory.php on line 121
.This is because in PHP8
call_user_func_array
passes the$options
array as named parameters if it has named keys.Using
array_values()
to return a numerically keyed array would fix the issue as the options would then be passed positionaly just as they are in PHP7 and this would maintain both PHP7 and PHP8 compatibility.return call_user_func_array(array($reflection, 'newInstance'), array_values($options));
The text was updated successfully, but these errors were encountered: