AddressBook::full_address() should not be called statically ...
NOTE: SourceForge is currently having problems with their mailing
lists. This is a message originally from Juergen Nickelsen sent on
Tue, 13 Jan 2015 15:22:43 +0100
Recently we moved our SquirrelMail installation from Debian Squeeze to
Wheezy, which implies a move from PHP 5.3 to PHP 5.4. The latter is
probably the reason that the error log is now swamped by messages like
(Technically, the size of the error log doesn't matter so much, but I
don't really like it that other, maybe more interesting error messages
are obscured by a high number of these.)
Now I am not a real PHP programmer, but when I look at that method and
the places where it is called, it seems like it can or even *should*
actually be a static method, as it does not use $this at all.
So I tried and made the method static, and all places where the method
is called still seem to work as intended.
Is this maybe the way to go? Any objections? What will break when I put
this change into production?
<[hidden email]> Tel +49.30.838-50740 Fax -450740
Zentraleinrichtung fuer Datenverarbeitung, Central Systems (Unix)
Freie Universitaet Berlin, Fabeckstrasse 32, 14195 Berlin, DE
Re: AddressBook::full_address() should not be called statically ...
> [Mon Jan 12 17:31:00 2015] [error] [client 172.19.10.20] PHP Strict
> Standards: Non-static method AddressBook::full_address() should not be
> called statically in
> /home/webmail/public_html/src/addrbook_search_html.php on line 129,
> https://webmail.zedat.fu-berlin.de/src/compose.php?mailbox=3DINBOX&startM= > essage=3D1
> Now I am not a real PHP programmer, but when I look at that method and
> the places where it is called, it seems like it can or even *should*
> actually be a static method, as it does not use $this at all.
I don't know if this method was originally designed to be called
externally, but you're right that it is fine being defined as static
and since it's being called statically from elsewhere, we should
declare it that way. Change committed. Thanks!