• Resolved pshemek

    (@emmek)


    This happens when I try to save a navigation menu widget with dynamic options set. The options are actually saved, but I end up at the death screen.

    Fatal error: Uncaught Error: count(): Argument #1 ($value) must be of type Countable|array, string given
    in /public/wp-content/plugins/dynamic-widgets/dynwid_admin_save.php on line 313
    
    Call stack:
    
        require_once()
        wp-content/plugins/dynamic-widgets/dynamic-widgets.php:664
        dynwid_init()
        wp-includes/class-wp-hook.php:324
        WP_Hook::apply_filters()
        wp-includes/class-wp-hook.php:348
        WP_Hook::do_action()
        wp-includes/plugin.php:517
        do_action()
        wp-settings.php:643
        require_once()
        wp-config.php:99
        require_once()
        wp-load.php:50
        require_once()
        wp-admin/admin.php:34
        require_once()
        wp-admin/themes.php:10
Viewing 3 replies - 1 through 3 (of 3 total)
  • sharkstack

    (@sharkstack)

    We have the same error. We solved it by rolling our development site back to PHP 7.*

    The error apparently only occurs in PHP 8.*

    • TypeError thrown
      count(): Argument #1 ($value) must be of type Countable|array, string given

    • This reply was modified 12 months ago by sharkstack.
    Plugin Author vivalex

    (@vivalex)

    @emmek & @sharkstack

    Can you share the minimum set of dynamic widget edit options that lead to this behavior? We have tested on PHP 8 and with WP 6.4 and can’t reproduce this error.

    Thanks!

    Thread Starter pshemek

    (@emmek)

    I cannot reproduce it anymore so I mark the issue as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error when saving dynamic options for a widget on WP 6.4 & PHP 8.1’ is closed to new replies.