Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin errors on php8 #125

Open
randohinn opened this issue Mar 6, 2022 · 1 comment
Open

Plugin errors on php8 #125

randohinn opened this issue Mar 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@randohinn
Copy link

randohinn commented Mar 6, 2022

Bug description
I have a site I tried updating to PHP 8 from 7.4, (veebimajutus.ee's install of WP, if that matters). On php8, attempts to access the admin panel, result in

Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, bool given in /home/vagrant/wordpress/wp-content/plugins/smaily-for-wp/includes/class-smaily-for-wp-options.php:89 Stack trace: #0 /home/vagrant/wordpress/wp-content/plugins/smaily-for-wp/includes/class-smaily-for-wp-options.php(89): array_merge() #1 /home/vagrant/wordpress/wp-content/plugins/smaily-for-wp/includes/class-smaily-for-wp-options.php(51): Smaily_For_WP_Options->get_form_options_from_db() #2 /home/vagrant/wordpress/wp-content/plugins/smaily-for-wp/admin/class-smaily-for-wp-admin.php(81): Smaily_For_WP_Options->get_form_options() #3 /home/vagrant/wordpress/wp-includes/class-wp-hook.php(307): Smaily_For_WP_Admin->smaily_admin_render() #4 /home/vagrant/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #5 /home/vagrant/wordpress/wp-includes/plugin.php(474): WP_Hook->do_action() #6 /home/vagrant/wordpress/wp-admin/includes/menu.php(155): do_action() #7 /home/vagrant/wordpress/wp-admin/menu.php(394): require_once('...') #8 /home/vagrant/wordpress/wp-admin/admin.php(158): require('...') #9 /home/vagrant/wordpress/wp-admin/index.php(10): require_once('...') #10 {main} thrown in /home/vagrant/wordpress/wp-content/plugins/smaily-for-wp/includes/class-smaily-for-wp-options.php on line 89

Steps for reproducing
Steps to reproduce the behavior:

  1. Update to php8 on veebimajutus's install (options for the plugin stored in wp_options table)
  2. Try accessing the admin

Expected behavior
I can still access the admin panel

Actual behavior
Recieve aforementioned error.

WordPress version
5.8

Module version
3.0.7

Additional context
Weirdly enough, another site that has php 8 but a different db structure (options seem to be held in smaily specific tables), works fine.

@randohinn randohinn added the bug Something isn't working label Mar 6, 2022
@kaittodesk
Copy link
Member

Thank you taking the time to report the issue.

Unfortunately we are not able to reproduce the issue within our development environment on a fresh install of Smaily for WP 3.0.7 on WordPress 5.8 on PHP7.4, where latter is updated to PHP8.0.

Was the plugin initially installed with version prior to 3.0.0, and later updated to 3.0.7?
Can you share the raw database value of smailyforwp_form_option (with sensitive information redacted)?

Weirdly enough, another site that has php 8 but a different db structure (options seem to be held in smaily specific tables), works fine.

Versions prior to 3.0.0 used custom database tables to store configuration options of the plugin. This was changed in version 3.0.0 of the plugin which started to use Options API. Is the another site using the latest version of the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants