Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

Unable to return anything from server module function.

$
0
0
I've opened a ticket with WHMCS hoping they might know what I'm doing wrong but I figured I'd post here just in case somebody here might know and if not, I can post a solution here for others if I find one.

This is driving me nuts, all of my other functions work properly but I cannot get this one to work at all:
Code:

function mod1_gen($var1) {
  $result = "success";
  return $result;
}

Although when I change it to this, it dies and shows "success" on a blank page like it's supposed to so I know the function is being called correctly and is working, it's just the "return" that doesn't work:

Code:

function mod1_gen($anyvar) {
  $result = "success";
  die($result);
  return $result;
}

I have over a dozen other functions in this module that all work correctly, just not this one. Any ideas what would prevent "return" from working? There are no error logs anywhere on the server and I have debugging enabled and no errors are being displayed. I've been fighting with this for almost an hour and I can't figure it out.

Viewing all articles
Browse latest Browse all 13458

Trending Articles