So I was working on a cool new plugin (top secret xD) and found a bug, actually two. When I add hooks there's a hook named "handler_tickets" but in handlers/tickets.php there's [code]($hook = FishHook::hook('tickets_handler')) ? eval($hook) : false;[/code]
also in line 204 of the same file there's [code]($hook = FishHook::hook('tickets_columns')) ? eval($hook) : false;[/code] which is not on the hooks list.
So instead of like [code]($hook = FishHook::hook('hook_name')) ? eval($hook) : false;[/code] it would be [code]($hook = FishHook::hook('HOOK_NAME')) ? eval($hook) : false;[/code]
or did I not understand? (tired >_>)
Fixed invalid name and added missing location.
no, it would be: [code]($hook = FishHook::hook(HOOK_NAME)) ? eval($hook) : false;[/code]
and that way if you misspell it there will be a warning (or error I don't remember right now) telling you that such define does not exist.
Maybe it would be better if instead of using string names you'd use defines, that way code wouldn't be less readable but it would be harder to make mistakes.
Something like: [code]define('HOOK_GLOBALS', 1);[/code]