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

ID: 18405
Comment by: inzite
Reported By: inzite at mail dot ru
Summary: Non-static method PEAR::load Extension() should not be
called statically
Status: Open
Type: Bug
Package: XML_RPC2
Operating System: FreeBSD and GNU/Linux
Package Version: 1.0.8
PHP Version: 5.3.6
New Comment:

This appears to be a bug in PEAR (present as of version 1.9.2, but may
be fixed in later versions). When run in strict mode, PHP 5.3 checks to
make sure that class functions are not called statically unless they've
been declared with the static keyword. PEAR::loadExtension() is allowed
to be called statically, but its implementation omits the static
keyword. Hence you get a runtime warning. This is just a warning and
should not affect program execution.

Note: The documentation for the PEAR::loadExtension() function
specifically states that it can be called statically. See
http://pear.php.net/manual/en/core.pear.pear.loadextension.php


Previous Comments:
------------------------------------------------------------------------

[2011-03-28 23:13:37] tj

Description:
------------
I got the following PHP error when using the attached test script:

PHP Strict Standards: Non-static method PEAR::load
Extension() should not be called statically in
/usr/local/share/php/XML/RPC2/Backend.php on line 111


Test script:
---------------
https://gist.github.com/891398


Expected result:
----------------
$ php bug_test.php | head -n 5
PHP Notice: Undefined property:
XML_RPC2_Server_Input_PhpInput::$readRequest in
/home/tj/tmp/XML_RPC/XML_RPC2/XML/RPC2/Server/Input/PhpInput.php on line
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8"
/>
<title>Available XMLRPC methods for this server</title>


Actual result:
--------------
$ php bug_test.php | head -n 5
PHP Strict Standards: Non-static method PEAR::loadExtension() should
not be called statically in
/home/tj/tmp/XML_RPC/XML_RPC2/XML/RPC2/Backend.php on line 111
PHP Notice: Undefined property:
XML_RPC2_Server_Input_PhpInput::$readRequest in
/home/tj/tmp/XML_RPC/XML_RPC2/XML/RPC2/Server/Input/PhpInput.php on line
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8"
/>
<title>Available XMLRPC methods for this server</title>

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 21, '11 at 7:01a
activeApr 21, '11 at 7:01a
posts1
users1
websitepear.php.net

1 user in discussion

Inzite: 1 post

People

Translate

site design / logo © 2022 Grokbase