ShaunR Posted December 8, 2017 Share Posted December 8, 2017 (edited) I think with v7 a autoloader was added that allowed modules to autoload from the lib directory. Does this autoloader not allow loading of libs from other modules? For example, I have a addon module called addonModule with a lib called AddonLib. I want to access that AddonLib from a serverModule. I did the following but am getting and error. #AddonLib namespace WHMCS\Module\Addon\AddonModule class AddonLib {} #ServerModule use WHMCS\Module\Addon\AddonModule\AddonLib; $addonLib = AddonLib(); #Error Error: Call to undefined function WHMCS\Module\Addon\AddonModule\AddonLib() in /home/dev/public_html/modules/servers/servermodule/servermodule.php:29 Stack trace: #0 /home/dev/public_html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): servermodule_ConfigOptions(Array) #1 /home/dev/public_html/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call('ConfigOptions', Array) #2 /home/dev/public_html/admin/configproducts.php(0): WHMCS\Module\Server->call('ConfigOptions', Array) #3 {main} Edited December 8, 2017 by ShaunR Link to comment Share on other sites More sharing options...
ShaunR Posted December 8, 2017 Author Share Posted December 8, 2017 Ughhh! One of those days. Scratch all of that, it works just fine. For whatever reason i forgot to add new Link to comment Share on other sites More sharing options...
Recommended Posts