-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 13
-
Component/s: Fax Pro (Commercial), UCP (User Control Panel)
-
Labels:None
-
Distro:FreePBX Distro
Hi!
UCP crashes with a "Division by zero" for multiple people that migrated from Elastix 2.5 to FreePBX 13 and 14.
The problem was tracked down to Fax Pro's UCP support by replacing $e->getMessage() by $e->getTraceAsString() at what is currently line 108 of /var/www/html/admin/modules/ucp/htdocs/index.php.
The resulting stack trace was this:
#0 /var/www/html/admin/modules/faxpro/ucp/Faxpro.class.php(27): Whoops\Run->handleError(2, 'Division by zer...', '/var/www/html/a...', 27, Array)
#1 /var/www/html/admin/modules/ucp/htdocs/includes/Module_Helpers.class.php(119): UCP\Modules\Faxpro->__construct(Object(UCP\Modules))
#2 /var/www/html/admin/modules/ucp/htdocs/includes/Module_Helpers.class.php(33): UCP\Module_Helpers->autoload('Faxpro')
#3 /var/www/html/admin/modules/ucp/htdocs/includes/Modules.class.php(84): UCP\Module_Helpers->__get('Faxpro')
#4 /var/www/html/admin/modules/ucp/htdocs/includes/Modules.class.php(105): UCP\Modules->moduleHasMethod('Faxpro', 'getMenuItems')
#5 /var/www/html/admin/modules/ucp/htdocs/includes/Modules.class.php(163): UCP\Modules->getModulesByMethod('getMenuItems')
#6 /var/www/html/admin/modules/ucp/htdocs/index.php(106): UCP\Modules->getActiveModules()
#7 {main}
It looks like line 27 of Faxpro.class.php is actually error handling code in Fax Pro but hopefully it will be easy to track down where a division by 0 could occur in the preceding code.
This problem was tracked down in the following thread in the forums: https://community.freepbx.org/t/ucp-error-division-by-zero/45357/30
Thank you and have a nice day1
Nicolas