• Hi folks,
    I just went to upgrade my site to PHP 8.0 and it “encountered a critical error”.
    The logs show this:
    PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, int given in …/wp-content/themes/tar/inc/customizer-function.php:183

    Checking the file shows that count() is being used on the return value of strlen(), which is odd, since the conditional ought to work with just strlen().

    Removing count() from the conditionals in that file resolved the issue for me.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8 errors with usage of count()’ is closed to new replies.