• Resolved ericcorbett2

    (@ericcorbett2)


    After upgrading from PHP 7.4 to 8.1, a few pages on our site now crash with this error in the log:

    16 {main}
    thrown in /home/rv39cs3t/public_html/engole.info/wp-content/plugins/zotpress/lib/shortcode/shortcode.functions.php on line 597
    [19-Jun-2023 17:42:43 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/rv39cs3t/public_html/engole.info/wp-content/plugins/zotpress/lib/shortcode/shortcode.functions.php:597

Viewing 1 replies (of 1 total)
  • Thread Starter ericcorbett2

    (@ericcorbett2)

    I have to hold my hand up and say that after looking into this issue more deeply, it was caused by my error in the parameter that I passed to Zotpress.

    I do think though that it would be a good idea to check whether a parameter/variable is countable or not before trying to count it.

    • This reply was modified 1 year, 4 months ago by ericcorbett2.
    • This reply was modified 1 year, 4 months ago by ericcorbett2.
    • This reply was modified 1 year, 4 months ago by ericcorbett2.
Viewing 1 replies (of 1 total)
  • The topic ‘Another PHP 8.1 issue’ is closed to new replies.