Page MenuHomeIn-Portal Phabricator

D435.diff
No OneTemporary

File Metadata

Created
Sat, Apr 19, 7:12 PM

D435.diff

Index: branches/5.2.x/core/kernel/utility/unit_config_reader.php
===================================================================
--- branches/5.2.x/core/kernel/utility/unit_config_reader.php
+++ branches/5.2.x/core/kernel/utility/unit_config_reader.php
@@ -479,6 +479,11 @@
$hooks = $config['Hooks'];
foreach ($hooks as $hook) {
+ // Don't attempt to register a hook to a module isn't installed.
+ if ( isset($hook['HookToModule']) && !isset($this->Application->ModuleInfo[$hook['HookToModule']]) ) {
+ continue;
+ }
+
if ( isset($config['ParentPrefix']) && ($hook['HookToPrefix'] == $config['ParentPrefix']) ) {
trigger_error('Depricated Hook Usage [prefix: <strong>' . $config['Prefix'] . '</strong>; do_prefix: <strong>' . $hook['DoPrefix'] . '</strong>] use <strong>#PARENT#</strong> as <strong>HookToPrefix</strong> value, where HookToPrefix is same as ParentPrefix', defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_NOTICE);
}

Event Timeline