ZC v 155f
Just upgraded to PHP7.1
Code:
[27-Apr-2018 09:22:19 America/Toronto] Request URI: /index.php?main_page=shopping_cart, IP address: xxx.xxx.x.xx
#1 perweightunit->quote() called at [/home/xxx/public_html/includes/classes/shipping.php:171]
#2 shipping->quote() called at [/home/xxx/public_html/includes/modules/shipping_estimator.php:140]
#3 require(/home/xxx/public_html/includes/modules/shipping_estimator.php) called at [/home/xxx/public_html /includes/templates/xxx/templates/tpl_shopping_cart_default.php:184]
#4 require(/home/xxx/public_html/includes/templates/xxx/templates/tpl_shopping_cart_default.php) called at [/home/xxx/public_html/includes/templates/xxx/common/tpl_main_page.php:247]
#5 require(/home/xxx/public_html/includes/templates/xxx/common/tpl_main_page.php) called at [/home/xxx/public_html/index.php:97]
[27-Apr-2018 09:22:19 America/Toronto] PHP Warning: A non-numeric value encountered in /home/xxx/public_html/includes/modules/shipping/perweightunit.php on line 105
Line 105 of perweightunit.php:
Code:
$this->quotes = array('id' => $this->code,
The whole section is:
Code:
function quote($method = '') {
global $order, $shipping_weight, $shipping_num_boxes;
$total_weight_units = $shipping_weight;
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipp ing_num_boxes) +
(MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PE RWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));
if ($this->tax_class > 0) {
$this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']) ;
}
if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
return $this->quotes;
}
I've seen other posts that suggest declaring the variable as float(); but I'm not sure how to proceed here.
Thanks for any help with this.
Bookmarks