mirror of
https://we.phorge.it/source/phorge.git
synced 2024-09-20 01:08:50 +02:00
Fix PHP 8.1 "trim(null)" exception which blocks rendering Reports' Burnup Rate page
Summary: Since PHP 8.1, passing a null string to `trim()` is deprecated. Thus first check that $row['oldValue'] is not null before trimming it. Closes T15392 Test Plan: Applied this change; afterwards "Burnup Rate" page at `/maniphest/report/burn/` got correctly rendered in web browser. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15392 Differential Revision: https://we.phorge.it/D25224
This commit is contained in:
parent
538cccc63e
commit
2ffbef8820
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ final class ManiphestReportController extends ManiphestController {
|
||||||
switch ($row['transactionType']) {
|
switch ($row['transactionType']) {
|
||||||
case ManiphestTaskStatusTransaction::TRANSACTIONTYPE:
|
case ManiphestTaskStatusTransaction::TRANSACTIONTYPE:
|
||||||
// NOTE: Hack to avoid json_decode().
|
// NOTE: Hack to avoid json_decode().
|
||||||
$oldv = trim($row['oldValue'], '"');
|
$oldv = $row['oldValue'];
|
||||||
|
if ($oldv !== null) {
|
||||||
|
$oldv = trim($oldv, '"');
|
||||||
|
}
|
||||||
$newv = trim($row['newValue'], '"');
|
$newv = trim($row['newValue'], '"');
|
||||||
break;
|
break;
|
||||||
case ManiphestTaskMergedIntoTransaction::TRANSACTIONTYPE:
|
case ManiphestTaskMergedIntoTransaction::TRANSACTIONTYPE:
|
||||||
|
|
Loading…
Reference in a new issue