php errors from calling non-static functions statically.
-
Getting these errors. It appears that one can just put ‘static’ in front of the functions to fix the errors (though I’m not sure if that is the best thing to do)
for example:
public static function calendar(…
public static function init(…
etc…call_user_func() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::calendar() should not be called statically
/wp-includes/shortcodes.php(287)call_user_func_array() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::enqueue_scripts() should not be called statically
/wp-includes/plugin.php(470)call_user_func_array() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::enqueue_scripts() should not be called statically
/wp-includes/plugin.php(470)call_user_func_array() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::footer_js() should not be called statically
/wp-includes/plugin.php(470)call_user_func_array() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::init() should not be called statically
/wp-includes/plugin.php(470)call_user_func_array() expects parameter 1 to be a valid callback, non-static method WP_FullCalendar::init() should not be called statically
/wp-includes/plugin.php(470)
- The topic ‘php errors from calling non-static functions statically.’ is closed to new replies.