
Hi Michael, The version of Pear::Mail I was using was 1.1.14. I also tried updating to the latest beta version 1.2.0b2 but I still got the same error. I will try update my php version to the latest as well and see if that helps. Thanks. On Tue, Sep 15, 2009 at 5:44 PM, Michael Pedersen <sku@kaal.dk> wrote:
Hi Brian (and other skunks),
*Short answer:*
Upgrade to a more recent version of PEAR::Mail - namely a version higher than 1.1.7 in the version 1.1.7 change-log it states that they specifically fixed this issue:
- Mail::factory() now returns object references without generating PHP warnings.
See: http://pear.php.net/package/Mail/download/1.1.7
*Long answer:*
I have not checked the code - but looking at the error message it seems as if they are accessing another static function/attribute from within the static factory function - however they are using the old/wrong way of doing this ( this::attributename ) instead of ( self::attributename )
In short the version of the code you are using have not been fixed (fully) to run with PHP5
Regards Michael Pedersen
Brian Ngure wrote:
Hi,
To any PHP/Pear gurus. I am getting the following error in PHP5. Anyone know how to resolve?
Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context
The method factory is static as noted here: http://pear.php.net/manual/en/package.mail.mail.factory.php.
This code works fine in PHP4.
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Regards, Brian Ngure