PEAR in Strict Mode
| From: | Tanner Naeher | Date: | Fri, 02 Jul 2010 16:33:08 +0000 |
| Subject: | PEAR in Strict Mode | ||
| Groups: | php.pear.qa | ||
| Request: | Send a blank email to pear-qa+get-5699@lists.php.net to get a copy of this message | ||
Hi,
I have my error settings on strict and get several 2048 errors.
ERROR_NUMBER: 2048
TEXT: Non-static method Mail_mimePart::encodeHeader() should not be called statically, assuming $this from incompatible context
FILE: /PEAR/Mail/mime.php
LINE: 1296
TIME OCCURRED: July 01, 2010, 14:56:20
BACKTRACE:
Mail_mime.encodeHeader("MIME-Version", "1.0", "ISO-8859-1", "quoted-printable") # line 1275, file: /PEAR/Mail/mime.php
Mail_mime._encodeHeaders(Array[3]) # line 1072, file: /PEAR/Mail/mime.php
Mail_mime.headers(Array[2]) # line 467, file: /email.php
Email.send_email() # line 442, file: /email.php
function encodeHeader($name, $value, $charset, $encoding)
{
return Mail_mimePart::encodeHeader(
$name, $value, $charset, $encoding, $this->_build_params['eol']
);
}
Basically every place where you call a PEAR function in a method like PEAR::function(). This works if they are in static mode but not if they reference any class variables with $this. So basically everywhere that the PEAR::isError() or PEAR::raiseError() functions are used I get an error.
I know that if I switch it out of strict mode I won't get these type of errors, but I was curious if there might be PEAR scripts that work in strict mode.
Thank you for your time,
Tanner