• Resolved dyin

    (@dyin)


    Hey there,

    I am getting the following PHP error in my logs after the update to the latest version:

    Got error ‘PHP message: PHP Warning: Undefined array key “hide_upgrade_menu” in /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/settings.php on line 109’

    Any idea where it is coming from?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dyin

    (@dyin)

    Ok I had to rollback to version 3.5
    3.6.1 gave me a fatal error.

    Got error ‘PHP message: PHP Warning: Undefined array key “hide_upgrade_menu” in /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/settings.php on line 109PHP message: PHP Warning: Undefined array key “hide_upgrade_menu” in /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/settings.php on line 109PHP message: PHP Fatal error: Uncaught TypeError: Code_Snippets\Settings\Setting_Field::render_checkbox(): Argument #3 ($checked) must be of type bool, null given, called in /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/class-setting-field.php on line 163 and defined in /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/class-setting-field.php:129\nStack trace:\n#0 /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/class-setting-field.php(163): Code_Snippets\Settings\Setting_Field::render_checkbox(‘code_snippets_s…’, ‘Verberg de upgr…’, NULL)\n#1 [internal function]: Code_Snippets\Settings\Setting_Field->render_checkbox_field()\n#2 /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/settings/class-setting-field.php(103): call_user_func(Array)\n#3 /data/sites/web/mysite/www/wp-admin/includes/template.php(1824): Code_Snippets\Settings\Setting_Field->render(Array)\n#4 /data/sites/web/mysite/w…’

    EDIT: the rollback fixed the issue

    • This reply was modified 1 year ago by dyin.
    fondashci

    (@fondashci)

    same error here and is every 30 seconds

    Warning: Undefined array key “hide_upgrade_menu” in /public_html/wp-content/plugins/code-snippets/php/settings/settings.php on line 109

    function get_setting( string $section, string $field ) {
    $settings = get_settings_values();

    return $settings[ $section ][ $field ];

    }

    • This reply was modified 1 year ago by fondashci.
    majesticix

    (@majesticix)

    Receiving same error message on my one site as well. Not on the other for some reason. I disabled the plugin on the site where I am getting the error message.

    Thread Starter dyin

    (@dyin)

    I also found this error in my logs today (on the 3.5 version) I am running PHP 8.1:

    [Wed Nov 08 06:04:15.418931 2023] [error] AH01071: Got error ‘PHP message: RedisException: socket error on read socket in /data/sites/web/mysite/www/wp-content/object-cache.php:1922\nStack trace:\n#0 /data/sites/web/mysite/www/wp-content/object-cache.php(1922): Redis->get(‘wp:code_snippet…’)\n#1 /data/sites/web/mysite/www/wp-content/object-cache.php(193): WP_Object_Cache->get(‘active_snippets…’, ‘code_snippets’, false, NULL)\n#2 /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/class-db.php(214): wp_cache_get(‘active_snippets…’, ‘code_snippets’)\n#3 /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/class-db.php(264): Code_Snippets\DB::fetch_snippets_from_table(‘wp_snippets’, Array)\n#4 /data/sites/web/mysite/www/wp-content/plugins/code-snippets/php/snippet-ops.php(611): Code_Snippets\DB->fetch_active_snippets(Array)\n#5 /data/sites/web/mysite/www/wp-includes/class-wp-hook.php(310): Code_Snippets\execute_active_snippets(”)\n#6 /data/sites/web/mysite/www/wp-includes/class-wp-hook.php(334): WP_H…’

    • This reply was modified 1 year ago by dyin.
    Thread Starter dyin

    (@dyin)

    Disregard the last one. that should be a config error on my side

    David Barczak

    (@david-barczak)

    I got the same message once I updated to version 3.6.1. Is there a fix?

    Plugin Author Shea Bunge

    (@bungeshea)

    Should be fixed in v3.6.2. Thank you for reporting!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP warning message’ is closed to new replies.