After using php 5.4.7 on my local development server it threw this warning when entering into an order detail page in the admin.
[07-May-2013 21:53:52 UTC] PHP Warning: Illegal string offset 'id' in D:\.....\public_html\tienda\includes\modules\payment\cod.php on line 41
After reading this post
http://www.zen-cart.com/showthread.p...om-empty-value
I changed this
PHP Code:
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
to this
PHP Code:
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) && isset($order->delivery['country']['id']) ) {//steve added last clause for php 5.4.7
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
The line 41 mentioned in the debug log is the $check = $db->Execute...
The error stopped and the page seems to work ok.
Bookmarks