I have currently bootstrap theme version 3.15 installed and it works perfectly. But when I upgrade to the most recent version I get the following error:

TypeError: Argument 1 passed to _bootstrap_registry_sort_phase_functions() must be of the type array, null given, called in /sites/all/themes/bootstrap/includes/registry.inc on line 270 in _bootstrap_registry_sort_phase_functions() (line 307 of /sites/all/themes/bootstrap/includes/registry.inc).

What could be the problem?

Thank you
Mathias

Comments

muellm created an issue. See original summary.

ZalemCitizen’s picture

Same here, except I'm running PHP 5.6 so the error looks like :

Recoverable fatal error : Argument 1 passed to _bootstrap_registry_sort_phase_functions() must be of the type array, null given, called in /sites/all/themes/bootstrap/includes/registry.inc on line 270 and defined in _bootstrap_registry_sort_phase_functions() (line 307 in /sites/all/themes/bootstrap/includes/registry.inc).

Critical because it prevents to empty theme registry cache.

Apparently, removing array type for 1st argument make the trick, then fall back to original version of registry.inc

alexandersluiter’s picture

Is there a patch for this? I'm running PHP 7.0.x with this same problem.

vzsigmond’s picture

In some cases $registry[$hook][$phase_key] was null, and _bootstrap_registry_sort_phase_functions() takes this as an argument by reference. Patch attached. Still requires testing for side effects.

alexandersluiter’s picture

Once the patch is applied, I'm getting Uncaught Error: Call to undefined function menu_get_object() in /var/www/vhosts/mywebsite.com/httpdocs/includes/theme.inc:2580. Most pages load fine...but every few pages the user will get a WSOD. Thoughts?

vzsigmond’s picture

@alexandersluiter: all this happens after you apply the patch and clear the cache? I had no similar issue.

markhalliwell’s picture

Status: Active » Fixed
StatusFileSize
new1.55 KB

  • markcarver committed 6b09b37 on 7.x-3.x
    Issue #2944080 by markcarver, vzsigmond: TypeError in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.