Post by guancho » Mon May 11, 2015 8:47 pm

Please allow me to welcome everybody, as this is my first post here.

I have a problem with Opencart Version 2.0.2.0

When sending email to customer (e.g. notification about newly registered account, or password reset request), I get the following error:

Warning: Invalid argument supplied for foreach() in /home/mimmo/ftp/store/system/library/mail.php on line 22Warning: Cannot modify header information - headers already sent by (output started at /home/mimmo/ftp/store/index.php:98) in /home/mimmo/ftp/store/system/library/response.php on line 12

I have searched forum and web for this problem - most of the instances are result of blank spaces at the beginning of files, but this is not the case here. Do you have any other recommendation what to check?

I'd be very grateful for the answer.
Regards.

Newbie

Posts

Joined
Mon May 11, 2015 8:40 pm

Post by OSWorX » Mon May 11, 2015 11:14 pm

First of all, if a shop is alread ylive always DISABLE the output of messages > System > Server
Beside that sending a header (like this) and getting in troubles, it is also a security risk to show what is wrong!

Instead log them always in the file - but beware that this file does not become too big, otherwise the next error will come up!

What the error from the response.php may be, I do not know currently.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by guancho » Tue May 12, 2015 4:05 pm

Ok, this actually solved my issue - customer no longer see error.
Still in error.log file I can see that, but it's no longer critical.

Thank you for your advice.

Newbie

Posts

Joined
Mon May 11, 2015 8:40 pm

Post by OSWorX » Tue May 12, 2015 4:15 pm

guancho wrote:Ok, this actually solved my issue - customer no longer see error.
Still in error.log file I can see that, but it's no longer critical.

Thank you for your advice.
Of course.
But now you are running into the next trouble, because this error (and maybe others) fill up the errorlog file.
Once this file exceeds a defined size, you are not able to read the content via the backend.
And it could be, that no additonal messages are written into.

So, try to fix bugs, errors as soon as possible to avoid this!
Nevertheless, errors should be always fixed, maybe a function does not work as expected.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 6 guests