PEAR in Strict Mode

[email protected] (Tanner Naeher)
Newsgroups php.pear.qa
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.