Fatal Error with PHP 8.1
-
Hello,
We got a fatal error when we tried to edit and save the dynamic widget:Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynwid_admin_save.php:313 Stack trace: #0 /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynamic-widgets.php(664): require_once() #1 /data/web/virtuals/83224/virtual/www/wp-includes/class-wp-hook. php(324): dynwid_init(“) #2 /data/web/virtuals/83224/virtual/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /data/web/virtuals/83224/virtual/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /data/web/virtuals/83224/virtual/www/wp-settings.php(643): do_action(‘init’) #5 /data/web/virtuals/83224/virtual/www/wp-config. php(90): require_once(‘/data/web/virtu…’) #6 /data/web/virtuals/83224/virtual/www/wp-load.php(50): require_once(‘/data/web/virtu…’) #7 /data/web/virtuals/83224/virtual/www/wp-admin/admin. php(34): require_once(‘/data/web/virtu…’) #8 /data/web/virtuals/83224/virtual/www/wp-admin/themes. php(10): require_once(‘/data/web/virtu…’) #9 {main} thrown in /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynwid_admin_save.php on line 313
The dynamic widget was changed to static after this error and there is no way back.
Eventually, we found the solution by downgrading the PHP version on our development site to 7.4. After this downgrade, the problem disappeared.
Here is our production site setting:
WP: 6.4.3
PHP: 8.1.1.4
Dynamic Widgets: 1.6.2Can you please fix this error?
Thank you very much.
The page I need help with: [log in to see the link]
- The topic ‘Fatal Error with PHP 8.1’ is closed to new replies.