ERROR: Warning: call_user_func_array() expects parameter 1 to be a valid callbac
-
I am using a very old theme on one of my wordpress websites (murdock), which no longer has any support. I am getting the following error on my website, at the top of all pages:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name in /home/xnvrtebr/public_html/Blog/wp-includes/class-wp-hook.php on line 286
You cannot see the error on the wesite as it is black text on a black background. But you can if you highlight what is on the page with the mouse.
I am not a programmer/developer so I do not know how to fix this issue all by myself. Coding is beyond my skill level. Modifying existing code can be done (if someone shows me what to do or how to fix it). I can locate files & edit them.
Here is the code in class-wp-hook.php around line 286
/** * Calls the callback functions added to a filter hook. * * @since 4.7.0 * * @param mixed $value The value to filter. * @param array $args Arguments to pass to callbacks. * @return mixed The filtered value after all hooked functions are applied to it. */ public function apply_filters( $value, $args ) { if ( ! $this->callbacks ) { return $value; } $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = array_keys( $this->callbacks ); $num_args = count( $args ); do { $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] ); foreach ( $this->callbacks[ $priority ] as $the_ ) { if( ! $this->doing_action ) { $args[ 0 ] = $value; } // Avoid the array_slice if possible. if ( $the_['accepted_args'] == 0 ) { $value = call_user_func_array( $the_['function'], array() ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); unset( $this->iterations[ $nesting_level ] ); unset( $this->current_priority[ $nesting_level ] ); $this->nesting_level--; return $value; }
Line 286 is this bit:
$value = call_user_func_array( $the_['function'], $args );
Can someone who is cleverer than me please help me with this? Anyone?
- This topic was modified 5 years, 10 months ago by .
- This topic was modified 5 years, 10 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘ERROR: Warning: call_user_func_array() expects parameter 1 to be a valid callbac’ is closed to new replies.