• Resolved magmatos

    (@magmatos)


    Hi,

    After the last update to latest version 8.0.12 (installed last night) we are getting errors in backend. Logging says:

    AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/vhosts/domain.ext/http-live/wp-content/plugins/notification/src/Admin/CheckRestApi.php:31\nStack trace:\n#0 /var/www/vhosts/domain.ext/http-live/wp-content/plugins/notification/src/Admin/CheckRestApi.php(31): array_key_exists()\n#1 /var/www/vhosts/domain.ext/http-live/wp-includes/class-wp-hook.php(305): BracketSpace\\Notification\\Admin\\CheckRestApi->test_rest_api()\n#2 /var/www/vhosts/domain.ext/http-live/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#3 /var/www/vhosts/domain.ext/http-live/wp-includes/plugin.php(476): WP_Hook->do_action()\n#4 /var/www/vhosts/domain.ext/http-live/wp-admin/admin-header.php(303): do_action()\n#5 /var/www/vhosts/domain.ext/http-live/wp-admin/index.php(137): require_once('...')\n#6 {main}\n thrown in /var/www/vhosts/domain.ext/http-live/wp-content/plugins/notification/src/Admin/CheckRest...', referer: https://domain.ext/wp-admin/

    I disabled the plugin for now and the problem is solved. I hope you can find out and fix the problem.

    WP-core: latest 6.0.3
    PHP 8.0.24

    • This topic was modified 2 years, 5 months ago by magmatos.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Same here.
    can’t access any wordpress administration section. the page loads as usual, no problems. but when i login to the administration panel only the error is displayed.

    Thread Starter magmatos

    (@magmatos)

    I re-installed the previous version for the time being.

    In notification\src\Admin\CheckRestApi.php

    You need to replace

    		if ( array_key_exists( 'data', $message ) ) {
    			$is_available = 'RestApi' === $message['data'];
    		}
    

    with

    		if ( is_array( $message ) && array_key_exists( 'data', $message ) ) {
    			$is_available = 'RestApi' === $message['data'];
    		}
    

    $message is not always an array but can be null.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Hey, sorry for the issue, and thanks for the fast reaction! The patch is on the way and will be live in 15 minutes

    Hi, keep getting REST errors even after updating.

    2022/10/26 14:32:26 [error] 223#223: *44114 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object in /www/dizione_702/public/wp-includes/class-wp-hook.php:305
    Stack trace:
    #0 /www/dizione_702/public/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #1 /www/dizione_702/public/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #2 /www/dizione_702/public/wp-includes/rest-api.php(561): do_action('rest_api_init', Object(WP_REST_Server))
    #3 /www/dizione_702/public/wp-includes/rest-api.php(519): rest_get_server()
    #4 /www/dizione_702/public/wp-includes/rest-api.php(2868): rest_do_request(Object(WP_REST_Request))
    #5 [internal function]: rest_preload_api_request(Array, '/wp/v2/types?co...')
    #6 /www/dizione_702/public/wp-includes/block-editor.php(601): array_reduce(Array, 'rest_preload_ap...', Array)
    #7 /www/dizione_702/public/wp-admin/edit-form-blocks.php(75): block_editor_rest_api_preload(Array, Object(WP_" while reading response header from upstream, client: 185.56.156.220, server: www.dizione.it, request: "GET /wp-admin/post.php?post=604121&action=edit HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-dizione.sock:", host: "www.dizione.it:26524", referrer: "https://www.dizione.it/wp-admin/edit.php?post_type=post"
    Plugin Author Kuba Mikita

    (@kubitomakita)

    @metalinedev are you sure it’s coming from our plugin? I cannot see any mention of the notification in your log. If you disable our plugin does the error go away?

    Yes, by deactivating the plugin the error disappears. I use Notification on several sites, now I have to deactivate it because it prevents me from editing posts.

    We are seeing this same problem on many of our sites.

    If we upgrade from PHP 7.4 to PHP 8.0 then we can’t edit posts and pages for any post type without triggering a fatal error.

    If we deactivate this plugin, it doesn’t happen.

    If we go back to PHP 7.4, it doesn’t happen.

    Similar error logs as above.

    We submitted a video to support on your website of what we’re seeing.

    Could you help us address this ASAP? Our host is moving all sites to 8.0 in a few weeks.

    Thank you!

    Plugin Author Kuba Mikita

    (@kubitomakita)

    We try to chase down the issue and replicate it in our environment. Will keep you all posted

    Thanks, for the moment I am forced to deactivate the plugin on all sites.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    @metalinedev @theinnographer can you send us the debug information from your website? Simply go to Tools -> Site Health and then in the “Info” tab click the “Copy site info to clipboard” button

    To make sure your information remains safe, please send that over to [email protected]

    Unfortunately, we weren’t able to replicate that issue in any way. A fresh WP install and PHP 8.0 or 8.1 work just fine.

    Hi @kubitomakita I found out with the Kinsta team that the problem is that opcache needs to be turned on with opcache save.comments this fixed the issue for me.

    Opcache save comments is an option for opcache configuration. I think it is something he should know, so he can include it in the plugin requirements.

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Thanks @metalinedev for additional context! Turned out we missed the compatibility files in the last version. I just released the fix in version 8.0.14

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Error after last update’ is closed to new replies.