4
Hello, I need help to solve this problem.
I have the following code snippet (put the line number to facilitate):
**186** if ( function_exists( self::$function_val() ) === TRUE ){
**187** call_user_func( self::$function_val() );
**188** }
But the following error appears on the screen:
Fatal error: Call to Undefined method Widgets::Contacts() in /var/www/html/ui/includes/class_widgets.php on line 186
The Widgets::Contacts() function doesn’t really exist, but the purpose of function_exists is not to just check it and only return TRUE or FALSE??
He is saying that you are using an undefined method, not a function, so ta returning error.
– UzumakiArtanis
What is the value of
self::$function_val
? It’s a string?– Guilherme Nascimento
I have a feeling you’re confusing it with method_exists()
– Daniel Omine