centralnicgroup-opensource / rtldev-middleware-whmcs

CentralNic's WHMCS Software Bundle
https://centralnicreseller.com
Other
35 stars 15 forks source link

Product deletion blocked by modules/addons/cnicdns/hooks.php #241

Closed an0nz closed 1 year ago

an0nz commented 1 year ago

Describe the bug When deleting any product in WHMCS an error is thrown by /modules/addons/cnicdns/hooks.php:119

To Reproduce Steps to reproduce the behavior:

  1. Install latest release of whmcs-cnic-bundle and activate the CNIC DNS module
  2. Configure a DNS Zone Template in CNIC DNS (Step may not be required)
  3. Create an empty product
  4. Delete the empty product you just created
  5. See error

Expected behavior Product deletes without issue

Error Error: Class 'CNIC\WHMCS\DNS\Product' not found in /home/user/public_html/modules/addons/cnicdns/hooks.php:119 Stack trace:

0 /home/user/public_html/vendor/whmcs/whmcs-foundation/lib/Hook/Manager.php(0): WHMCS\Utility\SafeInclude::{closure}(Array)

1 /home/user/public_html/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\Hook\Manager->run('ProductDelete', Array, false)

2 /home/user/public_html/includes/functions.php(0): Illuminate\Support\Facades\Facade::__callStatic('run', Array)

3 /home/user/public_html/admin/configproducts.php(0): run_hook('ProductDelete', Array)

4 {main}

Context (please complete the following information):

KaiSchwarz-cnic commented 1 year ago

Thanks so much @an0nz for reporting. Do you mind giving v16.15.1 a try?

an0nz commented 1 year ago

Thanks @KaiSchwarz-cnic, the new version has resolved the problem.