• Resolved Piotr Kunicki

    (@kuperman87)


    Hi,

    I can see a fatal error with php8 or 8.1 and SportsPress plugin, here you can see the log:
    PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /…/wp-content/plugins/sportspress/includes/class-sp-player-list.php:272

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there,

    Is this error appeared on all your player lists? Which php version are you using? 8 or 8.1?

    Thanks,
    Savvas

    Thread Starter Piotr Kunicki

    (@kuperman87)

    Hi,

    Error appeared on my frontpage, so I’ve checked error log file and found this entry:
    PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /…/wp-content/plugins/sportspress/includes/class-sp-player-list.php:272

    It’s visible in php 8.0 and 8.1 when I change php to 7.4 everything is fine..

    Plugin Contributor Savvas

    (@savvasha)

    Hi @kuperman87,

    Can you share a link to your frontpage? Do you have any player lists appeared on your frontpage? Are you using any performance stats with decimal places?

    Thanks,
    Savvas

    is this really thread resolved?

    got a very similar issue here:

    Fatal error: Uncaught TypeError: Unsupported operand types: int + string in /wp-content/plugins/sportspress/includes/class-sp-league-table.php:396 Stack

    running with PHP v8.3.

    (int) $totals[ $team_id ]['eventminutes'] + $minutes

    there is happening some type casting for the one int type var and for the concatenated string type var not.
    type strictness is an issue now!

    so what could get done in between is just casting the second string var too and hope it’s correct without understanding the whole thing behind ??

    (int) $totals[ $team_id ]['eventminutes'] + (int) $minutes

    and then hope the next update will fix it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is your plugin compatible with PHP 8+ ?’ is closed to new replies.