Forums / Bug Reports / PHP Warning: Illegal string offset 'id'

PHP Warning: Illegal string offset 'id'

Views: 4,168

Results 1 to 4 of 4
30 May 2014, 5:27 AM
#1
nettric avatar

nettric

New Zenner

Join Date:
Sep 2013
Location:
MN
Posts:
9
Plugin Contributions:
0

PHP Warning: Illegal string offset 'id'

I have searched the forum and am just not finding the needed fix. Zen Cart 1.5.1 and recently needed to upgrade from PHP 5.3.x TO 5.5.12 and am receiving the following PHP errors when :

PHP Warning:  Illegal string offset 'id' in ..\includes\classes\shipping.php on line 32
PHP Warning:  Illegal string offset 'id' in ..\includes\classes\shipping.php on line 32  //yes, this is the same as the first 
PHP Warning:  Illegal string offset 'id' in ..\includes\modules\order_total\ot_shipping.php on line 41
PHP Warning:  Illegal string offset 'id' in ..\estore\includes\modules\order_total\ot_shipping.php on line 41

This is happening when a user logs in when a virtual item only (software download) is in the cart. In the item setup under, "Product is virtual:" I have, "Yes, skip shipping address" marked AND "Always Free Shipping:" set to "No, Normal Shipping Rules"

Now, interesting thing is, when I change this to, "No, Shipping address Required"...I ONLY receive the following PHP error:

PHP Warning:  Illegal string offset 'title' in ..\includes\modules\pages\checkout_shipping\header_php.php on line 88

If I change it back to, "Yes, skip shipping address" I get the original set of errors. I can navigate my store just fine, add/remove products just fine and do just about everything except check out with a virtual product...

Environment:

Zen Cart: 1.5.1
PHP 5.5.12
Platform: Server 2008 R2, IIS 7.5

Update:

I'm also getting the illegal string offset 'id' in many other php files on test orders with regular products as well

30 May 2014, 5:43 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PHP Warning: Illegal string offset 'id'

That's because v1.5.1 isn't compatible with your PHP 5.5 version.
It's a bug only insomuch as v1.5.1 was written before PHP 5.5 ever existed.

Version compatibility: http://www.zen-cart.com/content.php?48-what-are-the-server-requirements-to-run-zen-cart
About v1.5.3 and PHP 5.4, 5.5, 5.6: http://www.zen-cart.com/showthread.php?213429-Upcoming-versions-1-5-3-and-1-6-0-compatible-with-PHP-5-4-5-5-5-6
About v1.5.2-beta: http://www.zen-cart.com/showthread.php?211146-Pre-release-notice-for-v1-5-2

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 May 2014, 5:47 AM
#3
nettric avatar

nettric

New Zenner

Join Date:
Sep 2013
Location:
MN
Posts:
9
Plugin Contributions:
0

Re: PHP Warning: Illegal string offset 'id'

My apologies for wasting your time. Newer to ZC and just found these issues are being addressed in the upcoming releases. I did find the Github pulls that address all the files in question. I'll see if I can patch until the next version is released.

30 May 2014, 5:53 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PHP Warning: Illegal string offset 'id'

Nettric:

My apologies for wasting your time.No harm done.
Nettric:

Newer to ZCWelcome to the family :)
Nettric:

and just found these issues are being addressed in the upcoming releases. Thumbs up :thumbsup:

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.