swartjie Posted February 4, 2016 Share Posted February 4, 2016 hi guys, I have a hook for a module which when enabled in WHMCS V6 works perfectly, but in WHMCS V5 it throws the following error Catchable fatal error: Object of class Closure could not be converted to string in /myurltowhmcs/includes/hookfunctions.php on line 0 on any page I try to load. Is there a way to determine what is causing this? Or atleast if it is WHMCS V5, have the hook file be ignored completely? Note the Hook uses the following code, I am not sure if one of these are causing it though: add_hook("AfterCronJob", 1, function (){ some code... } and add_hook('ClientAreaSecondarySidebar', 1, function ($secondarySidebar){ some code... } 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 5, 2016 Share Posted February 5, 2016 from inside your ActionHook function, use the following to retrieve WHMCS version number global $CONFIG; $version = $CONFIG['Version']; 0 Quote Link to comment Share on other sites More sharing options...
swartjie Posted February 11, 2016 Author Share Posted February 11, 2016 Thank You very much!! 0 Quote Link to comment Share on other sites More sharing options...
JustinTomatoe Posted February 23, 2016 Share Posted February 23, 2016 happy moment 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.