ID:               29206
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tommy at vandervorst-bs dot nl
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Windows Server 2003 Standard
 PHP Version:      5.0.0
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is not a pure static method as it is really an object method that
is also allowed to be called statically, so under E_STRICT, that
non-fatal message is issued.
add $d->saveXML() and you will see the document was loaded.


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

[2004-07-16 11:56:34] tommy at vandervorst-bs dot nl

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 this bug report at http://bugs.php.net/?id=29206&edit=1

Reply via email to