From:             jj at intelequest dot com
Operating system: Windows XP
PHP version:      5.0.4
PHP Bug Type:     DOM XML related
Bug description:  Error with type of 2nd parameter when creating DOMDocument()

Description:
------------
When executing the demo code found at
http://www.php.net/manual/en/function.dom-domdocument-construct.php I
obtain the error message.

"Warning: domdocument() expects parameter 2 to be long"

My understanding (from the online docs) is that the 2nd parameter is to be
of type string.

Also, according to the documentation, this is the php 5 replacment to
DOM_XML i.e. this is DOM XML. Note that there is no sub-category for just
DOM so the next logical place to put errors such as these would be either
DOM XML or Documentation bug.



Reproduce code:
---------------
<?PHP
$dom = new DOMDocument('1.0', 'iso-8859-1');
echo $dom->saveXML();
?>



Expected result:
----------------
<?xml version="1.0" encoding="iso-8859-1"?>

Actual result:
--------------
Warning: domdocument() expects parameter 2 to be long, string given in
C:\temp\test_xml.php on line 2

Fatal error: Call to undefined method domdocument::saveXML() in
C:\temp\test_xml.php on line 3

-- 
Edit bug report at http://bugs.php.net/?id=32743&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32743&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32743&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32743&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32743&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32743&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32743&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32743&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32743&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32743&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32743&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32743&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32743&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32743&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32743&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32743&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32743&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32743&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32743&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32743&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32743&r=mysqlcfg

Reply via email to