Jump to content

Custom Module Functions won't print error


Recommended Posts

Hi all,


I've been developing a custom module for WHMCS and currently have a custom function within my module that performs some VPN stuff. The functionality is fine but the issue I'm having is any custom module function within WHMCS does not seem to allow the usage of $result to return an error. Setting $result to say, "Error in module" and returning it won't pop up with an error in the admin/client panel at all. All my standard functions (e.g. CreateAccount,TerminateAccount,etc.) work fine with returning errors and they are displayed to the end user.


Do custom functions (stuff that's defined within Client/AdminCustomButtonArray) have the inability to return errors or am I just missing something big?

Link to comment
Share on other sites

Are you returning it as an array?


return array('status'=>'failure', 'description'=>'An error occurred');


Still nothing.


I'm really confused as to why all the standard built in module functions (aka CreateAccount,SuspendAccount,TerminateAccount) can return an error correctly but not a custom one. The documents state returning a string that isn't "success" will print an error and it does, but just not in custom functions.


If no one else has any ideas, I might have to go bug support about this.

Link to comment
Share on other sites

Join the conversation

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

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