Bug report: Fatal Error related to dismissable messages

I’m getting this Fatal error after updating to 2.7.4. Just wanted to let you know.

I fixed it by deleting the row gform_sticky_admin_messages from the DB which had an empty value.

GF itself probaly assumes the value is at least a:0:{} which is an empty array, I think, right? Because, that’s the value after deleting the row and reloading the WP Dashboard.

I did not change any value directly in the DB before upgrading.

Kind regards,

Jaime

Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given in /Users/xyz/local/project/app/public/wp-content/plugins/gravityforms/includes/messages/class-dismissable-messages.php:118 Stack trace: #0 /Users/xyz/local/project/app/public/wp-content/plugins/gravityforms/includes/messages/class-dismissable-messages.php(118): array_merge(Array, '') #1 /Users/xyz/local/project/app/public/wp-content/plugins/gravityforms/common.php(5595): Gravity_Forms\Gravity_Forms\Messages\Dismissable_Messages->display(Array, 'site-wide') #2 /Users/xyz/local/project/app/public/wp-content/plugins/gravityforms/gravityforms.php(6614): GFCommon::display_dismissible_message(false, 'site-wide') #3 /Users/xyz/local/project/app/public/wp-includes/class-wp-hook.php(308): GFForms::action_admin_notices('') #4 /Users/xyz/local/project/app/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #5 /Users/xyz/local/project/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /Users/xyz/local/project/app/public/wp-admin/admin-header.php(303): do_action('admin_notices') #7 /Users/xyz/local/project/app/public/wp-admin/admin.php(239): require_once('/Users/xyz/...') #8 {main} thrown in /Users/xyz/local/project/app/public/wp-content/plugins/gravityforms/includes/messages/class-dismissable-messages.php on line 118

Er heeft zich een kritieke fout voorgedaan op deze site. Controleer je site beheerder e-mail inbox voor instructies.

It also triggers within the add method and the remove method within that PHP Class, because it call the get_option directly.


### Gravity Forms ###

Version: 2.7.4 ✔
Upload folder: /Users/xyz/local/project/app/public/wp-content/uploads/gravity_forms/
Upload folder permissions: Writable  ✔
Output CSS: No
Output HTML5: Yes
No-Conflict Mode: No
Currency: EUR
Background updates: No
REST API v2: No

### Add-Ons ###

Mailchimp: door Gravity Forms - 5.2.0  ✔

### Database ###

Database Version: 2.7.4  ✔ Your database is up-to-date.
wp_gf_form_view:   ✔
wp_gf_form_meta:   ✔
wp_gf_form:   ✔
wp_gf_form_revisions:   ✔
wp_gf_entry:   ✔
wp_gf_entry_meta:   ✔
wp_gf_entry_notes:   ✔
wp_gf_draft_submissions:   ✔
wp_gf_addon_feed:   ✔

### Translations ###

Site Locale: nl_NL
User (ID: 8) Locale: nl_NL
Gravity Forms: nl_NL
Mailchimp: nl_NL
User Registration: nl_NL

### WordPress ###

Home URL: https://project.local
Site URL: https://project.local
REST API Base URL: https://project.local/wp-json/
WordPress Version: 6.2 ✔
WordPress Multisite: No
WordPress Memory Limit: 256M
WordPress Debug Mode: Yes
WordPress Debug Log: Yes
WordPress Script Debug Mode: No
WordPress Cron: No
WordPress Alternate Cron: No
Background tasks: Yes  ✔

### Active Theme ###

Project: by Me  - 1 ✔

### Active Plugins ###

### Web Server ###

Software: nginx/1.16.0
Port: 10008
Document Root: /Users/xyz/local/project/app/public

### PHP ###

Version: 8.0.22 ✔
Memory Limit: 256M
Maximum Execution Time: 1200
Maximum File Upload Size: 300M
Maximum File Uploads: 20
Maximum Post Size: 1000M
Maximum Input Variables: 4000
cURL Enabled: Yes (versie 7.84.0)
OpenSSL: OpenSSL 1.1.1q  5 Jul 2022 (269488415)
Mcrypt Enabled: No
Mbstring Enabled: Yes
Loaded Extensions: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, FFI, fileinfo, filter, ftp, gd, gettext, SPL, iconv, intl, json, mbstring, session, standard, pcntl, mysqlnd, PDO, pdo_mysql, Phar, posix, readline, Reflection, mysqli, shmop, SimpleXML, soap, sockets, sodium, exif, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, imagick, Zend OPcache, xdebug

### Database Server ###

Database Management System: MySQL
Version: 8.0.16 ✔
Database Character Set: utf8
Database Collation: utf8_general_ci

### Date and Time ###

WordPress (Local) Timezone: Europe/Amsterdam
MySQL (UTC): 2023-04-21 13:44:49
MySQL (Local): 21 april 2023 op 15:44
PHP (UTC): 2023-04-21 13:44:49
PHP (Local): 21 april 2023 op 15:44

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.