ZC version 1.54 PHP Version 5.6.31 Official Sagepay Integration - Version: 1.0
Logging the following PHP warning
[12-Aug-2017 06:37:20 Europe/London] PHP Warning: Illegal string offset 'id' in /var/www/vhosts/laptopstands.co.uk/heightadjustabledesks.solutions/includes/modules/payment/sagepay_zc/sagepay_zc_payment.php on line 85
Line 85 starts $sql =
Googling the warning infers it is something introduced in PHP 5.4 and to do with strings that should be arrays, don't really know myself, is there a solution to this please.
PHP Code:
public function update_status()
{
global $order, $db;
if ($this->enabled == false || (int)$this->getModuleDefineValue('_ZONE') == 0) {
return;
}
$check_flag = false;
$sql = "SELECT zone_id FROM " . TABLE_ZONES_TO_GEO_ZONES . " WHERE geo_zone_id = '" . (int)$this->getModuleDefineValue('_ZONE') . "' AND zone_country_id = '" . (int)$order->billing['country']['id'] . "' ORDER BY zone_id";
$checks = $db->Execute($sql);
foreach ($checks as $check) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
Bookmarks