cannot be null when argument #1 ($objectOrMethod) is an object¶
Description¶
The ReflectionMethod class requires 2 argument: the first with the class, and the second with the method name. Passing one argument is deprecated.
Example¶
<?php
$x = new X();
$method = new ReflectionMethod($x);
?>
Solutions¶
Adds the name as second argument
method
.