Commit 074e21a7 by Scott

Fix infinite loop in override

parent 2a8c7256
...@@ -641,9 +641,11 @@ ...@@ -641,9 +641,11 @@
/** /**
* If $function has been overridden by a plugin override, return the name of the overriding function, otherwise return * Determines whether a function is to be overridden by a plugin. But if the function is being called with
* null. But if the function is being called with the _base suffix, any override will be bypassed due to $qa_direct * the _base suffix, any override will be bypassed due to $qa_direct.
* @param string $function The function to override *
* @param string $function The function to override
* @return string|null The name of the overriding function (of the form `qa_functionname_override_1_in_filename`)
*/ */
function qa_to_override($function) function qa_to_override($function)
{ {
...@@ -660,6 +662,7 @@ ...@@ -660,6 +662,7 @@
if (@$qa_direct[$function]) { if (@$qa_direct[$function]) {
unset($qa_direct[$function]); // bypass the override just this once unset($qa_direct[$function]); // bypass the override just this once
return null;
} }
return $qa_overrides[$function]; return $qa_overrides[$function];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment