X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FArray.php;h=14563ccabe757d15bf3f1d535290189330795416;hb=6e902643f72c1e215dbdd04e15e99148c2f9706e;hp=1a3d8a002072b1cab93d60e1a9bf724d69bb6718;hpb=22599d4660ae116295f85aa5ebecc3ad7c87eddc;p=civicrm-core.git diff --git a/CRM/Utils/Array.php b/CRM/Utils/Array.php index 1a3d8a0020..14563ccabe 100644 --- a/CRM/Utils/Array.php +++ b/CRM/Utils/Array.php @@ -569,10 +569,10 @@ class CRM_Utils_Array { $node = &$result; foreach ($keys as $key) { if (is_array($record)) { - $keyvalue = isset($record[$key]) ? $record[$key] : NULL; + $keyvalue = $record[$key] ?? NULL; } else { - $keyvalue = isset($record->{$key}) ? $record->{$key} : NULL; + $keyvalue = $record->{$key} ?? NULL; } if (isset($node[$keyvalue]) && !is_array($node[$keyvalue])) { $node[$keyvalue] = []; @@ -915,7 +915,7 @@ class CRM_Utils_Array { foreach ($matrix as $pos => $oldRow) { $newRow = []; foreach ($columns as $column) { - $newRow[$column] = CRM_Utils_Array::value($column, $oldRow); + $newRow[$column] = $oldRow[$column] ?? NULL; } $newRows[$pos] = $newRow; }