From: tommy at vandervorst-bs dot nl
Operating system: Windows Server 2003 Standard
PHP version: 5.0.0
PHP Bug Type: DOM XML related
Bug description: DOMDocument::LoadXML: Strict Standards: DOMDocument::loadXML(); is
not static
Description:
------------
The following code:
$d = DOMDocument::loadXML("<some><xml><here></here></xml></some>");
works perfectly well, but when setting PHP to report E_STRICT warnings:
error_reporting(E_ALL|E_STRICT);
It says:
Strict Standards: Non-static method DOMDocument::loadXML() should not be
called statically in [some script] on line [some line]
which I think is incorrect, since DOMDocument::loadXML is (even according
to the manual,
http://nl2.php.net/manual/en/function.dom-domdocument-loadxml.php) a
static function.
Reproduce code:
---------------
<?php
error_reporting(E_ALL|E_STRICT);
$d = DOMDocument::loadXML("<some><xml><here></here></xml></some>");
?>
Expected result:
----------------
No error, this code is (in my eyes) perfectly valid.
Actual result:
--------------
Strict Standards: Non-static method DOMDocument::loadXML() should not be
called statically in [some script] on line [some line]
--
Edit bug report at http://bugs.php.net/?id=29206&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29206&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29206&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29206&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29206&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29206&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29206&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29206&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29206&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29206&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29206&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29206&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29206&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29206&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29206&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29206&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29206&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29206&r=float