Forums

Send email from email[GH] with this error

mat_rapit 05 Jul, 2012
Hye there,
i got this message after submitting but the email are sending.
Here is the message:
Warning: trim() expects parameter 1 to be string, array given in C:\wamp\www\....\libraries\joomla\mail\helper.php on line 35

it appear above the thanks message.
Please help me get rid of this error

This is the code from line 35:
public static function cleanLine($value)
{
return trim(preg_replace('/(%0A|%0D|\n+|\r+)/i', '', $value)); <-----LINE 35
}


Thanks!
GreyHead 05 Jul, 2012
Hi mat_rapit,

I'm not sure what generates this warning - it's an empty string in $value but the clean function is called many times with different $values. You can usually hide PHP warnings by setting Error Reporting to System Default or None in the Site Global Configuration.

Bob
mat_rapit 06 Jul, 2012
Thanks, it okay now.
im fill up the 'reply to' field and the warning gone.
'Error reporting are still at 'default'
This topic is locked and no more replies can be posted.