nadeemshafi9 Posted February 24, 2009 Share Posted February 24, 2009 hi guys i just started using reflections and am having trouble invoking a method here is teh error Fatal error: Uncaught exception 'ReflectionException' with message 'Non-object passed to Invoke()' in C:\xampp\htdocs\blah\service.php:9 Stack trace: #0 C:\xampp\htdocs\rabbit\service.php(9): ReflectionMethod->invoke(NULL) #1 {main} thrown in C:\xampp\htdocs\blah\service.php on line 9 here is the code service.php?invoke=all (the method pronts "all") include("inc.services.php"); $invoke = $_GET['invoke']; $args = $_GET['args']; $method = new ReflectionMethod('Music', $invoke); var_dump($method->invoke(NULL)); any help much appreciated Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted February 24, 2009 Author Share Posted February 24, 2009 i worked it out the method has to be final public static Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.