PHP Script Debugging

Job ID: 39082032

Budget: $10 – $30 USD

I have a PHP script primarily used for processing text data that's throwing an error.

Error:
TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, bool given in /home/myint/public_html/modules/addons/agsdaterange/hooks.php:111
Stack trace:
#0 /home/myint/public_html/modules/addons/agsdaterange/hooks.php(111): date_format()
#1 [internal function]: WHMCS\Utility\SafeInclude::{closure}()
#2 /home/myint/public_html/vendor/whmcs/whmcs-foundation/lib/Hook/Manager.php(0): call_user_func()
#3 /home/myint/public_html/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\Hook\Manager->run()
#4 /home/myint/public_html/includes/orderfunctions.php(0): Illuminate\Support\Facades\Facade::__callStatic()
#5 /home/myint/public_html/cart.php(0): calcCartTotals()
#6 {main}

Fix needed.

File attached
Related categories: PHP Software Architecture MySQL HTML WHMCS