[buddypress-trac] [BuddyPress Trac] #8860: PHP 8.1.17 - PHP Fatal error: Uncaught TypeError: Unsupported operand types: int - string in bp-core/bp-core-functions.php:1349
buddypress-trac
noreply at wordpress.org
Thu Mar 30 11:17:24 UTC 2023
#8860: PHP 8.1.17 - PHP Fatal error: Uncaught TypeError: Unsupported operand
types: int - string in bp-core/bp-core-functions.php:1349
--------------------------+-----------------------------
Reporter: lenasterg | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: critical | Keywords:
--------------------------+-----------------------------
Hi.
I just updated to PHP 8.1.17 and I get the following Fatal error
PHP Fatal error: Uncaught TypeError: Unsupported operand types: int -
string in bp-core/bp-core-functions.php:1349
I managed to solve it by replacing the line 1349
{{{
$diff = $r['newer_date'] - $r['older_date'];
}}}
with the
{{{
$diff = (int)$r['newer_date'] - (int)$r['older_date'];
}}}
Please, replace it at the next version.
Thanks again for the great work.
Bests, Lena
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8860>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list