• The plugin stopped working after I upgraded to PHP 8, causing a PHP fatal error:

    PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/…/wp-content/plugins/vertical-center/classes/class-vertical-center.php:204

    This error can be fix if you replace count() with is_countable() in the conditional of that line of code from:

    $field_count = count( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;

    to:

    $field_count = is_countable( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;

    Hopefully this patch can be implemented in the plugin.

    Thanks!

  • The topic ‘Broken in PHP 8 (patch included)’ is closed to new replies.