X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FGlobalStack.php;h=50403d9546ea2018b1ca2cd62b91dc849918c4fb;hb=1124d2f4354857252e248e777541206d9352e497;hp=44fc1c6bdc5efd1761c3172f825426266a1f6a27;hpb=b46379c1a2a975fe0c5142d40ed03f19578844a7;p=civicrm-core.git diff --git a/CRM/Utils/GlobalStack.php b/CRM/Utils/GlobalStack.php index 44fc1c6bdc..50403d9546 100644 --- a/CRM/Utils/GlobalStack.php +++ b/CRM/Utils/GlobalStack.php @@ -17,7 +17,7 @@ /** * Temporarily change a global variable. * - * @code + * ``` * $globals = CRM_Utils_GlobalStack::singleton(); * $globals->push(array( * '_GET' => array( @@ -26,7 +26,7 @@ * )); * ...do stuff... * $globals->pop(); - * @endcode + * ``` * * Note: for purposes of this class, we'll refer to the array passed into * push() as a frame. @@ -76,11 +76,11 @@ class CRM_Utils_GlobalStack { foreach ($new as $globalKey => $values) { if (is_array($values)) { foreach ($values as $key => $value) { - $frame[$globalKey][$key] = CRM_Utils_Array::value($key, $GLOBALS[$globalKey]); + $frame[$globalKey][$key] = $GLOBALS[$globalKey][$key] ?? NULL; } } else { - $frame[$globalKey] = CRM_Utils_Array::value($globalKey, $GLOBALS); + $frame[$globalKey] = $GLOBALS[$globalKey] ?? NULL; } } return $frame;