Jump to content

Unable to return anything from server module function.


KuJoe

Recommended Posts

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:

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:

 

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.

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.

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