Forums / Bug Reports / [Done 1.3.9] Empty Delimeter Error on Update Order

[Done 1.3.9] Empty Delimeter Error on Update Order

Locked

Views: 4,844

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
16 May 2008, 6:05 AM
#1
kanine avatar

kanine

New Zenner

Join Date:
Mar 2008
Location:
Victoria AU
Posts:
48
Plugin Contributions:
0

[Done 1.3.9] Empty Delimeter Error on Update Order

I am getting the following error with 1.3.8a when updating an order status and sending out a notification. The email still goes out but the message is a bit of a concern to our operations staff:

Warning: strstr() [function.strstr]: Empty delimiter. in /home///shop/includes/functions/functions_email.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /home///shop/includes/functions/functions_email.php:103) in /home///shop/admin/includes/functions/general.php on line 21

Any help would be appreciated.

Edit: Error seems to come from this section:

      if ($module != 'xml_record') {
        if (!strstr($email_text, sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS)) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS && !defined('EMAIL_DISCLAIMER_NEW_CUSTOMER')) $email_text .= "\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS);
        if (!strstr($email_text, EMAIL_SPAM_DISCLAIMER) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS) $email_text .= "\n" . EMAIL_SPAM_DISCLAIMER;
      }

The bottom of the email looks like this:

Your order has been updated to the following status:
New status: Shipping
Please reply to this email if you have any questions.
Copyright (c) 2008 Zen Cart. Powered by Zen Cart
This email address was given to us by you or by one of our customers. If you feel that you have received this email in error, please send an email to sales@***.com

16 May 2008, 1:59 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

What addons do you have installed?

.
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.

16 May 2008, 5:53 PM
#3
kanine avatar

kanine

New Zenner

Join Date:
Mar 2008
Location:
Victoria AU
Posts:
48
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

I have the trublu template installed, as well as some customisation of Shipping and Payment terms, largely clones of flat and cod. The google analytics is also installed. I think that's pretty much it. apart from the odd customisation of text here and there.

17 May 2008, 6:43 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

Are you missing this line in your /admin/includes/languages/english/email_extras.php file?

define('EMAIL_SPAM_DISCLAIMER','This e-mail is sent in accordance with the US CAN-SPAM Law in effect 01/01/2004. Removal requests can be sent to this address and will be honored and respected.');

.
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.

17 May 2008, 7:43 AM
#5
kanine avatar

kanine

New Zenner

Join Date:
Mar 2008
Location:
Victoria AU
Posts:
48
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

Yes that file contains that entry, however my override file contains:

define('EMAIL_SPAM_DISCLAIMER','');

I did try changing this to:
define('EMAIL_SPAM_DISCLAIMER','anything');

But this still left me with the same error.

17 May 2008, 12:26 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

You said "override file". What about the original non-override file? (The admin doesn't use overrides)

.
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.

17 May 2008, 1:15 PM
#7
kanine avatar

kanine

New Zenner

Join Date:
Mar 2008
Location:
Victoria AU
Posts:
48
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

The original file was not touched.

17 May 2008, 7:03 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

Well, since the error message is talking about line 103, then it's complaining that EMAIL_SPAM_DISCLAIMER is blank.
So, if you're intending to keep the spam disclaimer text as blank,
I suppose the way to fix it is to change the line from this:if (!strstr($email_text, EMAIL_SPAM_DISCLAIMER) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS) $email_text .= "\n" . EMAIL_SPAM_DISCLAIMER;to this:```
if (defined('EMAIL_SPAM_DISCLAIMER') && EMAIL_SPAM_DISCLAIMER != '' && !strstr($email_text, EMAIL_SPAM_DISCLAIMER) && $to_email_address != STORE_OWNER_EMAIL_ADDRESS) $email_text .= "\n" . EMAIL_SPAM_DISCLAIMER;

.
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.

17 May 2008, 8:35 PM
#9
kanine avatar

kanine

New Zenner

Join Date:
Mar 2008
Location:
Victoria AU
Posts:
48
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

Hey Dr Byte...

You were actually spot on the first time. The issue was caused because I blanked out the email disclaimer in /admin/includes/languages/english/email_extras.php. I guess this makes sense as the update email comes from the admin account, order confirmations come from the customer side of the store and having a blank EMAIL_SPAM_DISCLAIMER there does not appear to cause any issues. So maybe this is a genuine bug and should be fixed as you describe.

Thanks very much for your help!

15 Aug 2009, 7:24 PM
#10
jeet_kune_do avatar

jeet_kune_do

Zen Follower

Join Date:
Nov 2008
Location:
Slovenija
Posts:
119
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

I get the following error, and no one of this technics worked.

Warning: strstr() [function.strstr]: Empty delimiter in /home/erotici1/public_html/includes/functions/functions_email.php on line 103

Warning: strstr() [function.strstr]: Empty delimiter in /home/erotici1/public_html/includes/functions/functions_email.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /home/erotici1/public_html/includes/functions/functions_email.php:103) in /home/erotici1/public_html/includes/functions/functions_general.php on line 44

What else should cause the problem?

Thank's for your support!

I love internet and the power of information... Best Wishes!!

15 Aug 2009, 10:07 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

Jeet Kune Do:

Warning: strstr() [function.strstr]: Empty delimiter in /home/erotici1/public_html/includes/functions/functions_email.php on line 103
That's caused by the same thing described earlier.
Your EMAIL_SPAM_DISCLAIMER in one or more of your language files is blank.

.
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.

18 Aug 2009, 1:52 PM
#12
jeet_kune_do avatar

jeet_kune_do

Zen Follower

Join Date:
Nov 2008
Location:
Slovenija
Posts:
119
Plugin Contributions:
0

Re: [Done 1.3.9] Empty Delimeter Error on Update Order

The EMAIL_SPAM_DISCLAIMER was blank, but not in the
/admin/includes/languages/english/email_extras.php

It was blank in:

includes/languages/english/email_extras.php

Problem fixed.

Thank you all for your help!

:clap:

I love internet and the power of information... Best Wishes!!