namhost Posted May 10, 2018 Share Posted May 10, 2018 I am trying to switch from using the normal api, to using the internal API. Everything has gone swimmingly, except now when I try to run "AddClient". And only if I run it from within Drupal. So this works: <?php require_once("./init.php"); var_dump($whmcs): ?> But put those lines inside of a Drupal module, and $whmcs is null. I thought it was perhaps a $whmcs or other global variable that is set or used in init.php and somehow that causes the $whmcs to be null. Reason for that is if I actually try to run "AddClient", I end up with this error: 17 {main} {"exception":"[object] (Error(code: 0): Call to a member function get_config() on string at \includes\clientfunctions.php:0)"} [] According to the guys at WHMCS, this is the code being hit: <?php $companyName = $whmcs->get_config('CompanyName'); ?> Why in Drupalk would $whmcs become a string? Did it not get initalized? If not, why? Any ideas? 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.