SiteStats: Use the null coalescing assignment operator
Available since PHP 7.4. Follows up 43a93d9782.
Change-Id: I1460645b5e04f18df55167ce6b60bce57a1006e7
This commit is contained in:
parent
c7110ae098
commit
0227699422
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ class SiteStats {
|
|||
$finalRow = new stdClass();
|
||||
foreach ( $rows as $row ) {
|
||||
foreach ( $fields as $field ) {
|
||||
$finalRow->$field = $finalRow->$field ?? 0;
|
||||
$finalRow->$field ??= 0;
|
||||
if ( $row->$field ) {
|
||||
$finalRow->$field += $row->$field;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue