Uncaught TypeError (PHP 8 issue?)
-
I’m getting the following error when trying to activate version 2.8.15 of this plugin with WordPress 5.6 (RC1) and PHP 8.0.0:
Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, string given in /var/www/html/blog/wp-content/plugins/urvanov-syntax-highlighter/util/class-urvanov-syntax-highlighter-util.php:663 Stack trace: #0 /var/www/html/blog/wp-content/plugins/urvanov-syntax-highlighter/util/class-urvanov-syntax-highlighter-util.php(672): UrvanovSyntaxHighlighterUtil::version_parts() #1 /var/www/html/blog/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php(1134): UrvanovSyntaxHighlighterUtil::version_compare() #2 /var/www/html/blog/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php(1326): Urvanov_Syntax_Highlighter_Plugin::update() #3 /var/www/html/blog/wp-admin/includes/plugin.php(2299): include('...') #4 /var/www/html/blog/wp-admin/plugins.php(191): plugin_sandbox_scrape() #5 {main} thrown in /var/www/html/blog/wp-content/plugins/urvanov-syntax-highlighter/util/class-urvanov-syntax-highlighter-util.php on line 663
I don’t see anything in the PHP 8 breaking changes list, but I wonder if they switched this warning to an error: https://wiki.php.net/rfc/counting_non_countables
- The topic ‘Uncaught TypeError (PHP 8 issue?)’ is closed to new replies.