Unverified Commit 3609290e authored by Matthieu Rolland's avatar Matthieu Rolland Committed by GitHub
Browse files

Merge pull request #27874 from lmeyer1/fix-hook-case

Hook getHookStatusByName should not be case-sensitive
parents d3f04604 cc046a68
......@@ -1277,7 +1277,7 @@ class HookCore extends ObjectModel
$hook_names = Cache::retrieve('active_hooks');
} else {
$sql = new DbQuery();
$sql->select('name');
$sql->select('lower(name) as name');
$sql->from('hook', 'h');
$sql->where('h.active = 1');
$active_hooks = Db::getInstance()->executeS($sql);
......@@ -1289,6 +1289,6 @@ class HookCore extends ObjectModel
}
}
return in_array($hook_name, $hook_names);
return in_array(strtolower($hook_name), $hook_names);
}
}
Supports Markdown
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