Jump to content

(Bug 4.6.12) Commerce DivisionByZeroError: Division by zero (0) #0


The Old Man

Recommended Posts

One for the rare circumstances to do list, perhaps... I created an uncaught exception which resulted in the AdminCP Dashboard home showing the error message instead of the normal view.

IPS 4.6.12 Commerce (Full Suite), PHP 8.0.21

How I broked it good:

Changed an existing chargeable product (downloadable file) to free (no issues), then used the option to cancel all purchases (I had none). Went to the AdminCP but site displayed the uncaught exception:
 

The URL of page the error occurred on was https://mysite.com/admin/?app=core&module=overview&controller=dashboard

DivisionByZeroError: Division by zero (0)
#0 /home/mysite/public_html/applications/core/extensions/core/Dashboard/BackgroundQueue.php(56): IPS\nexus\extensions\core\Queue\_MassChangePurchases->getProgress(Array, 0)
#1 /home/mysite/public_html/applications/core/modules/admin/overview/dashboard.php(64): IPS\core\extensions\core\Dashboard\_BackgroundQueue->getBlock()
#2 /home/mysite/public_html/system/Dispatcher/Controller.php(101): IPS\core\modules\admin\overview\_dashboard->manage()
#3 /home/mysite/public_html/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
#4 /home/mysite/public_html/admin/index.php(13): IPS\_Dispatcher->run()
#5 {main}

Backtrace

#0 /home/mysite/public_html/init.php(1015): IPS\_Log::log('DivisionByZeroE...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(DivisionByZeroError))
#2 {main}

I'm unsure if it was the price being set to 0.00 first or the fact there were no purchases and renewals to mass cancel.

I just stepped backwards in the browser to the change the price back to 10.00 and then the error disappeared immediately from the AdminCP homepage.

Link to comment
Share on other sites

Please update to the latest release first of all. If you are then still seeing the problem, I will get this escalated for you so we can get it looked into further. I am not able to replicate this on my end on the latest release

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...