note 86225 added to domdocument.construct
| From: | steve at mrclay dot org | Date: | Wed, 08 Oct 2008 16:45:04 +0000 |
| Subject: | note 86225 added to domdocument.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145170@lists.php.net to get a copy of this message | ||
To expand on bholbrook's comment, if you receive this: "Warning:
domdocument::domdocument() expects at least 1 parameter", it is due to the old domxml
extension, which you need to disable.
domxml overwrites DOMDocument::_construct with an alias to domxml_open_mem, so this code:
<?php
$doc = new DOMDocument();
?>
...essentially does this:
<?php
$dom = domxml_open_mem();
?>
...which is why PHP complains about expecting at least 1 parameter (it expects a string of XML).
----
Server IP: 209.41.74.194
Probable Submitter: 128.227.142.14
----
Manual Page -- http://www.php.net/manual/en/domdocument.construct.php
Edit -- https://master.php.net/note/edit/86225
Del: integrated -- https://master.php.net/note/delete/86225/integrated
Del: useless -- https://master.php.net/note/delete/86225/useless
Del: bad code -- https://master.php.net/note/delete/86225/bad+code
Del: spam -- https://master.php.net/note/delete/86225/spam
Del: non-english -- https://master.php.net/note/delete/86225/non-english
Del: in docs -- https://master.php.net/note/delete/86225/in+docs
Del: other reasons-- https://master.php.net/note/delete/86225
Reject -- https://master.php.net/note/reject/86225
Search -- https://master.php.net/manage/user-notes.php