Doc #65355 [Opn->Nab]: Documented return values for DOMNode::hasChildNodes are incorrect
| From: | krakjoe@php.net | Date: | Thu, 03 Oct 2013 06:45:13 +0000 |
| Subject: | Doc #65355 [Opn->Nab]: Documented return values for DOMNode::hasChildNodes are incorrect | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10393@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65355&edit=1
ID: 65355
Updated by: krakjoe@php.net
Reported by: kyle at klowell dot com
Summary: Documented return values for DOMNode::hasChildNodes
are incorrect
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
hasChildNodes poses a question, just like hasNoChildNodes does.
The return values description is perfectly sufficient.
Previous Comments:
------------------------------------------------------------------------
[2013-07-29 18:28:52] kyle at klowell dot com
Description:
------------
---
From manual page: http://www.php.net/domnode.haschildnodes#refsect1-
domnode.haschildnodes-returnvalues
---
Currently the page lists the following:
```
Return Values
Returns TRUE on success or FALSE on failure.
```
This is incorrect, since the method returns TRUE when the node has child
elements, and FALSE when it does not. FALSE may or may not be returned by an
error state, but the developer is most likely looking for the empty state.
This should probably be changed to:
```
Return Values
Returns TRUE if the node has children or FALSE if not.
```
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65355&edit=1