summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Carver2018-04-18 03:22:32 (GMT)
committerMark Carver2018-04-18 03:22:32 (GMT)
commit6b09b3767428d9815b49ba3337a41952ba1364b1 (patch)
tree7401011502e10ffcb29f3e896c59b702cbd7b7e3
parent5b223c8501035900c171c5de6608498cf9b8dec9 (diff)
Issue #2944080 by markcarver, vzsigmond: TypeError in _bootstrap_registry_sort_phase_functions()
Signed-off-by: Mark Carver <mark.carver@me.com>
-rw-r--r--includes/registry.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/registry.inc b/includes/registry.inc
index c0039ef..263f8ae 100644
--- a/includes/registry.inc
+++ b/includes/registry.inc
@@ -229,9 +229,6 @@ function _bootstrap_process_theme_registry(array &$registry, $themes) {
// File to be included by core's theme function when a theme hook is
// invoked.
if (isset($registry[$hook])) {
- if (!isset($registry[$hook][$phase_key])) {
- $registry[$hook][$phase_key] = array();
- }
if (!isset($registry[$hook]['includes'])) {
$registry[$hook]['includes'] = array();
}
@@ -252,6 +249,11 @@ function _bootstrap_process_theme_registry(array &$registry, $themes) {
// Iterate over each registered hook.
foreach ($registry as $hook => $info) {
+ // Ensure the current phase callback functions array exists.
+ if (!isset($registry[$hook][$phase_key])) {
+ $registry[$hook][$phase_key] = array();
+ }
+
// Remove function callbacks if a template was found.
if (isset($info['function']) && isset($info['template'])) {
unset($registry[$hook]['function']);