PHP 7.2 & count()
-
On line 248 of
/admin/class-equal-height-columns-admin.phpthe code below will break under PHP 7.2 if the value passed tocountisn’t countable.$field_count = count( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;It should instead also include a call to
is_countable()$field_count = is_countable( $this->options[ $this->options_group_slug ] ) && count( $this->options[ $this->options_group_slug ] ) ? count( $this->options[ $this->options_group_slug ] ) : 1;Unfortunately
is_countable()won’t be added until PHP 7.3 but there’s a really simple polyfill available:
https://github.com/Ayesh/is_countable-polyfill/blob/master/src/is_countable.php
The topic ‘PHP 7.2 & count()’ is closed to new replies.