d.me Posted December 11, 2011 Share Posted December 11, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted December 11, 2011 Share Posted December 11, 2011 Are you returning it as an array? return array('status'=>'failure', 'description'=>'An error occurred'); 0 Quote Link to comment Share on other sites More sharing options...
d.me Posted December 11, 2011 Author Share Posted December 11, 2011 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. 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.