I have upgraded to PHP 5.0.1, it has caused the following crucial script to stop working: MimeDecode.php from PEAR MAIL package which I use in my webmail package.
It worked perfectly on PHP 4.2.2
Now, I receive the following error message when raw mime message is put in for decoding:
PHP Fatal error: Using $this when not in object context in /var/www/mail/get.phtml on line 283
It is talking about this line:
if (!isset($this->mailMimeDecode) AND isset($params['input'])) {
I have no clue of how this works or what the error means, I have a simple mimedecode.php script (called by get.phtml) taken from Mail Pear Package, I have also found this bug report, which includes a solution to the problem, although is for a different line (line 168, although in the uncommented script the line where I am expierencing the error is line 128):
The bug report is here: http://pear.php.net/bugs/bug.php?id=2113
It says the following:
Fatal error: Using $this when not in object context in
/usr/local/lib/php/Mail/mimeDecode.php on line 168
with:
$output = Mail_mimeDecode::decode($Params);
=> no fatal error with
$mail_mimedecode=new Mail_mimeDecode($input);
$output = $mail_mimedecode->decode($Params);
Please could someone shed light on this for me, or at least explain what the error means and what would be its common cause