Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Location
    California
    Posts
    200
    Plugin Contributions
    0

    Default PHP Notice: Undefined offset: 1

    1.5.7c
    PHP 7.2
    Edit Orders 4.6.0
    Twitch Hidden Model for 1.5.7c

    My log file keeps filling up with the below listed error. Any assistance would be greatly appreciated.

    PHP Notice: Undefined offset: 1 in /includes/functions/functions_email.php on line 140

    Code:
    135 // clean up currencies for text emails
    136      $zen_fix_currencies = preg_split("/[:,]/" , str_replace(' ', '', CURRENCIES_TRANSLATIONS));
    137      $size = sizeof($zen_fix_currencies);
    138      for ($i=0, $n=$size; $i<$n; $i+=2) {
    139        $zen_fix_current = $zen_fix_currencies[$i];
    140        $zen_fix_replace = $zen_fix_currencies[$i+1];
    141        if (strlen($zen_fix_current)>0) {
    142          while (strpos($email_text, $zen_fix_current)) $email_text = str_replace($zen_fix_current, $zen_fix_replace, $email_text);
    143        }
    144      }

  2. #2
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: PHP Notice: Undefined offset: 1

    If you go to your admin, then configuration and Email... What is the setting for the item titled: 'Convert Currencies for Text Emails'?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jun 2012
    Location
    California
    Posts
    200
    Plugin Contributions
    0

    Default Re: PHP Notice: Undefined offset: 1

    Quote Originally Posted by mc12345678 View Post
    If you go to your admin, then configuration and Email... What is the setting for the item titled: 'Convert Currencies for Text Emails'?
    It is blank

  4. #4
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: PHP Notice: Undefined offset: 1

    Quote Originally Posted by wsworx View Post
    It is blank
    To me that seems unusual and likely is why the log is being generated. A default install includes at least two if not three+ pre-existing items in that list. The absence of data may be causing some other value to be returned which is resulting in entering that loop with only one record not two to evaluate.

    Of course one question is what was done to clear that entry/why is it blank instead of the default. (posting tips answers may reveal some of that otherwise may also have a concern of *who* cleared it.)

    I don't have the answer at the moment of what the expected/default data is. For assistance to all readers it will be good to include and if someone else doesn't I will try to look it up and post here especially if you don't find/report those values.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jun 2012
    Posts
    406
    Plugin Contributions
    0

    Default Re: PHP Notice: Undefined offset: 1

    Funny, I am chasing the exact same error. Same symptom, same blank setting in email preferences. I did not knowingly change the default setting so I have no idea how it was wiped out. I went to a clean unmodified version of zc157c and copied the default setting from the database:
    Code:
    &pound;,£:&euro;,€:&reg;,®:&trade;,™
    I hope copy and paste works.
    Dave

  6. #6
    Join Date
    Jun 2012
    Posts
    406
    Plugin Contributions
    0

    Default Re: PHP Notice: Undefined offset: 1

    Thanks for the hint mc12345678!

 

 

Similar Threads

  1. v157 v157b PHP Notice: Undefined index: SSL_SESSION_ID
    By marton_1 in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 17 Apr 2021, 03:45 PM
  2. v157 PHP Notice: Undefined index
    By yueli7 in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 24 Jul 2020, 06:56 PM
  3. v155 adding constants - PHP Notice: Use of undefined constant
    By torvista in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 4 May 2016, 07:07 AM
  4. Replies: 2
    Last Post: 5 May 2010, 09:58 PM
  5. Undefined Notice: Use of undefined constant
    By TheOracle in forum Bug Reports
    Replies: 0
    Last Post: 6 May 2007, 06:33 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