Jump to content

Getting WHMCS version from HOOK


swartjie

Recommended Posts

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...

}

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated