• Drivingralle

    (@drivingralle)


    Hey!

    For a client I was debugging the problem, that they could not connect via there REST-API. Inside the error log I found this error.

    PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method WPM_Writesonic_Integration::remove_has_published_posts_from_wp_api_user_query() cannot be called statically in /wp-includes/class-wp-hook.php:324
    Stack trace:
    #0 /wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #1 /wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php(374): apply_filters()
    #2 /wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Users_Controller->get_items()
    #3 /wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()
    #4 /wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()
    #5 /wp-includes/rest-api.php(459): WP_REST_Server->serve_request()
    #6 /wp-includes/class-wp-hook.php(324): rest_api_loaded()
    #7 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #8 /wp-includes/plugin.php(565): WP_Hook->do_action()
    #9 /wp-includes/class-wp.php(418): do_action_ref_array()
    #10 /wp-includes/class-wp.php(818): WP->parse_request()
    #11 /wp-includes/functions.php(1342): WP->main()
    #12 /wp-blog-header.php(16): wp()
    #13 /index.php(17): require('/usr/www/users/...')
    #14 {main}
    thrown in /wp-includes/class-wp-hook.php on line 324

    For testing I disabled Writesonic and the connection worked. Verifying the log entry is breaking the connection.

    Greetings
    derRALF

The topic ‘REST-API error’ is closed to new replies.