Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39
  1. #31
    Join Date
    Apr 2010
    Posts
    262
    Plugin Contributions
    1

    Default Re: PHP 5.4 warnings: Illegal string offset

    Quote Originally Posted by rayw1679 View Post
    What is the impact of this error? Does it prevent the order from being completed, or just have the possibility of incorrect data? (We use flat-rate shipping, so we shouldn't be invoking any special calculations; however, we've had 10 of these errors within the past 2 months.) The fix appears extensive, and I don't want to break my store applying the fix (I'm good at that) if it's not a severe problem.
    I haven't done the extensive fix yet, but what I will do, is backup the files first, make the changes, then upload. If there is a problem, I will go right back to my backup files.

    I have had this error show up when there was no order, so it could be affecting sales.

  2. #32
    Join Date
    Mar 2005
    Location
    Waxahachie, Texas
    Posts
    174
    Plugin Contributions
    0

    Default Re: PHP 5.4 warnings: Illegal string offset

    Thank you.
    Thanks,
    Ray

  3. #33
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: PHP 5.4 warnings: Illegal string offset

    Quote Originally Posted by lat9 View Post
    The changes made for Zen Cart v1.5.2 were much more "intense" that those that I proposed in this thread. Please see https://github.com/zencart/zencart/c...2cb78fc86946c9 for the full set of changes made to v1.5.2 surrounding this issue.
    So running Zen Cart v1.5.1, PHP 5.4

    I made all of these changes and initially orders were going to a blank page upon confirmation.. I checked the error logs and I got errors about missing columns.. So I removed all the modified the blocks in the /includes/classes/order.php file which referred to these missing columns..

    After that no more PHP 5.4 errors..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #34
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: PHP 5.4 warnings: Illegal string offset

    Quote Originally Posted by DrByte View Post
    The following changes are incorporated into the next ZC version to handle the errors reported in this thread:

    https://github.com/zencart/zencart/c...2cb78fc86946c9

    https://github.com/zencart/zencart/c...6deb80026d2886
    DrByte

    I am trying to get the posted fixes on this thread to work on a 1.5.1 cart with php 5.4. The errors still persist. I was going back over the files I worked on comparing to the posted fixes to see if I made a mistake. Looking at the order.php file and comparing to the github link

    https://github.com/zencart/zencart/c...2cb78fc86946c9

    and also this thread

    http://www.zen-cart.com/showthread.p...ng-offset-cost

    I noticed a difference in line 368 + on github

    PHP Code:
    'shipping_cost' => isset($_SESSION['shipping']['cost']) ? $_SESSION['shipping']['cost'] : 0
    and thread 210291

    PHP Code:
    'shipping_cost' => (isset($_SESSION['shipping']['cost']) ? $_SESSION['shipping']['cost'] : 0), 
    which would be correct?

  5. #35
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: PHP 5.4 warnings: Illegal string offset

    Use the one on github; the one from the thread contains unnecessary parentheses.

  6. #36
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: PHP 5.4 warnings: Illegal string offset

    Quote Originally Posted by lat9 View Post
    Use the one on github; the one from the thread contains unnecessary parentheses.
    Thanks for that.

    I started from the beginning and uploaded just the patched /includes/classes/order.php file. The error message for the order.php file is gone now but was still getting

    Warning: Illegal string offset 'id' in /home1/xxx/public_html/includes/modules/order_total/ot_shipping.php on line 41
    Warning: Illegal string offset 'id' in /home1/xxx/public_html/includes/classes/shipping.php on line 32

    (both of the above are unmodified files)

    next I applied the patch to /includes/modules/order_total/ot_shipping.php on line 77

    That left me with these latest errors

    Warning: Illegal string offset 'id' in /home1/xxx/public_html/includes/modules/order_total/ot_shipping.php on line 41

    Warning: Illegal string offset 'id' in /home1/xxx/public_html/includes/modules/order_total/ot_shipping.php on line 77

    Warning: Illegal string offset 'id' in /home1/xxx/public_html/includes/classes/shipping.php on line 32

    I went ahead with the patches for

    /includes/modules/pages/checkout_shipping/header_php.php, starting around line 70:
    /includes/modules/pages/checkout_payment/header_php.php (line 36):
    /includes/modules/pages/checkout_confirmation/header_php.php (line 43):

    didn't help. still getting the latest errors.

    Because you didn't include the /includes/classes/order.php in your patches I tried restoring the order.php file to original and that brought back the orders error again. I put the patched file back again and am back to the latest 3 errors.

    any ideas?

  7. #37
    Join Date
    Aug 2013
    Location
    United States
    Posts
    73
    Plugin Contributions
    0

    Default Re: PHP 5.4 warnings: Illegal string offset

    I just noticed this error today too, does anyone know if this affects whether or not a customer can checkout, I just now noticed it for the first time this morning.

  8. #38
    Join Date
    Apr 2013
    Location
    eglisau switzerland
    Posts
    567
    Plugin Contributions
    0

    Default Re: PHP 5.4 warnings: Illegal string offset

    I have this error;
    3-Dec-2015 13:04:29 Europe/Zurich] PHP Warning: Illegal string offset 'id' in ....../catalog/includes/modules/payment/paypalwpp.php on line 200.

    Showed up 4 times starting at 12,00 and so far the error shown is the last one.

    Strange thing is nobody has used Paypal so far today on my site so what is triggering paypalwpp.php?
    No Paypal error messages.

    I am using v1.5.1 with the classic template

    Anybody have an idea could be causing this?

  9. #39
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP 5.4 warnings: Illegal string offset

    Quote Originally Posted by marton_1 View Post
    Strange thing is nobody has used Paypal so far today on my site so what is triggering paypalwpp.php?
    Perhaps they "started" checkout but didn't complete ... hence no evidence of completing purchases yet.
    Quote Originally Posted by marton_1 View Post
    I have this error;
    3-Dec-2015 13:04:29 Europe/Zurich] PHP Warning: Illegal string offset 'id' in ....../catalog/includes/modules/payment/paypalwpp.php on line 200.

    ...

    I am using v1.5.1 with the classic template

    Anybody have an idea could be causing this?
    Yes. ZC v1.5.1 is not compatible with PHP 5.4, and one of the symptoms of that is about 50 things that can trigger "Illegal string offset" errors.
    Ref: https://www.zen-cart.com/content.php...o-run-zen-cart

    You need to upgrade.
    .

    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.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Illegal string offset 'id' in order.php
    By marcopolo in forum General Questions
    Replies: 16
    Last Post: 25 Jul 2015, 04:31 PM
  2. Replies: 9
    Last Post: 23 Mar 2015, 08:42 AM
  3. v153 Illegal string offset 'id' in order.php
    By jeking in forum General Questions
    Replies: 0
    Last Post: 5 Sep 2014, 07:32 PM
  4. v151 PHP Warning: Illegal string offset 'id'
    By Nettric in forum Bug Reports
    Replies: 3
    Last Post: 30 May 2014, 06:53 AM
  5. Replies: 1
    Last Post: 30 Sep 2013, 07:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR