Edit report at http://pear.php.net/bugs/bug.php?id=17509&edit=1

ID: 17509
Updated by: jon@php.net
Reported By: d dot reiche at gmx dot ch
Summary: static use of non-static methods
-Status: Open
+Status: Closed
Type: Bug
Package: Log
Operating System: Ubuntu 10.04
Package Version: 1.12.1
PHP Version: 5.3.2
-Assigned To:
+Assigned To: jon
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: jon
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Previous Comments:

[2010-06-22 10:23:43] bigbadbassman

Added #patch


[2010-06-21 18:15:59] bigbadbassman

The docu encourages the use of Log::factory() or Log::singleton() which
seem like these methods where defined as static methods. Which is not
the case, leading to Fatal errors in PHP 5.3 with enabled E_STRICT.

Since Log depends on PHP5, it wouldn't be a problem to convert these 2
methods to static calls.

Test script:

require_once 'Log.php';
$log = Log::singleton('syslog', PEAR_LOG_TYPE_SAPI, 'test');

Expected result:
No error message, just a clean script output.

Actual result:
Strict standards: Non-static method Log::singleton() should not be
called statically, assuming $this from incompatible context in <filename


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedJul 26, '10 at 6:37a
activeJul 26, '10 at 6:37a

1 user in discussion

Jon: 1 post



site design / logo © 2022 Grokbase