JCSama / CodeIgniter-develbar

CodeIgniter Developer Toolbar is a third party library based on Profiler Library with additional functionality for debugging and optimisation, Database, Models, Helpers, Libraries, Views, Ajax...
MIT License
176 stars 57 forks source link

Hooks: allow closure usage #27

Closed SamuelDauzon closed 6 years ago

SamuelDauzon commented 6 years ago

Hi, noticed that Develbar don't allow use to use closure hook like this :

$hook['post_controller'] = function() { / do something here / }; (https://www.codeigniter.com/user_guide/general/hooks.html) I propose yopu a quick fix to avoid a crash.

It's not optimal because it don't fit closure hook in Develbar, but with this fix, develbar doesn't crash when closure hook is used.

Thank you for Develbar, it's usefull !

JCSama commented 6 years ago

Thank you @SamuelDauzon for your contribution, I just fixed it.