I'm on 1.5.1 running PHP 5.6 on a shared, GoDaddy cPanel and Linux server.
An error in my log file reads:
"[02-Aug-2017 22:53:24 UTC] PHP Warning: Illegal string offset 'id' in [path-to] moneyorder.php on line 40"
Line 40 in moneyorder.php is this:
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
There are two similar forum posts I found for this, calling out 'id' errors concerning orders.php. I was hoping to mimic their fixes.
Their URLs are here:
but their coding at the point of error is very different from what my line 40 in moneyorder.php line looks like, and I still have my Zencart training wheels on. They're changing the condition of their logical test as quoted below
changing this:
if (STORE_PRODUCT_TAX_BASIS == 'Shipping' && stristr($_SESSION['shipping']['id'], 'storepickup') == TRUE)
to this:
if (STORE_PRODUCT_TAX_BASIS == 'Shipping' && isset($_SESSION['shipping']['id']) && stristr($_SESSION['shipping']['id'], 'storepickup') == TRUE)
I attempted to construct the SQL it's constructing, but got lost at trying to figure out what
MODULE_PAYMENT_MONEYORDER_ZONE
was. I was hoping the
['country']['id']
toward the end of the query would have revealed something to the SQL parser that might have given me a clue on how to massage the code into what's right, but my SQL training wheels are bigger than my Zencart, PHP training wheels.
Incidental comment, the PHP tags in the post editor look really great when I'm reading the text version of a post I'm constructing, but when I preview the PHP code, the window that displays the PHP code is the tiniest, thinnest, single line, horizontal window that even cuts off the bottom half of the single line it's attempting to display and, IMHO needs to be at least four times taller. The reason I used QUOTE tags is so I could see all the code, because the PHP tags made the window tiny and forced me to scroll in a 0.5 x 80 character sliver of a window. The default PHP window display size needs attention.
Let me rephrase that: it needs A LOT of attention.