0

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Wppr_Public' does not have a method 'amp_support' in /home1/thrfolde/public_html/3foldtraining/wp-includes/class-wp-hook.php on line 288

How can I solve this error?

https://3foldtraining.com/ - on the top header (if you double click on the black bar you can see that error)

            // 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;
}
1

The warning message is pretty clear. You're passing method amp_support from class Wppr_Public as callback, but this class doesn;t have such method...

So how to fix it?

You should find that class and look for this function. Maybe it's some typo or that method changed its name or moved to another class or something like that.

PS. But there's another problem on your site. PHP warnings should never be printed on productions sites for security reasons. You should take care of that too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.