projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #18794 from eileenmcnaughton/need_less
[civicrm-core.git]
/
CRM
/
Utils
/
GlobalStack.php
diff --git
a/CRM/Utils/GlobalStack.php
b/CRM/Utils/GlobalStack.php
index 44fc1c6bdc5efd1761c3172f825426266a1f6a27..50403d9546ea2018b1ca2cd62b91dc849918c4fb 100644
(file)
--- a/
CRM/Utils/GlobalStack.php
+++ b/
CRM/Utils/GlobalStack.php
@@
-17,7
+17,7
@@
/**
* Temporarily change a global variable.
*
/**
* Temporarily change a global variable.
*
- *
@code
+ *
```
* $globals = CRM_Utils_GlobalStack::singleton();
* $globals->push(array(
* '_GET' => array(
* $globals = CRM_Utils_GlobalStack::singleton();
* $globals->push(array(
* '_GET' => array(
@@
-26,7
+26,7
@@
* ));
* ...do stuff...
* $globals->pop();
* ));
* ...do stuff...
* $globals->pop();
- *
@endcode
+ *
```
*
* Note: for purposes of this class, we'll refer to the array passed into
* push() as a frame.
*
* 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) {
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 {
}
}
else {
- $frame[$globalKey] =
CRM_Utils_Array::value($globalKey, $GLOBALS)
;
+ $frame[$globalKey] =
$GLOBALS[$globalKey] ?? NULL
;
}
}
return $frame;
}
}
return $frame;