php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41096 Warning: SimpleXMLElement::children() expects at most 1 parameter, 2 given
Submitted: 2007-04-16 03:54 UTC Modified: 2007-04-16 13:21 UTC
From: mistknight at gmail dot com Assigned: bjori (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.2.1 OS: kubuntu 6.10 edgy
Private report: No CVE-ID: None
 [2007-04-16 03:54 UTC] mistknight at gmail dot com
Description:
------------
I'm using PHP 5.2.0 and I'm getting this warning:

Warning: SimpleXMLElement::children() expects at most 1 parameter, 2 given

on this line of code:

$content = (array)$news->children('content',TRUE);

The problem seems like it's transient sometimes appearing and sometimes not :-( I downloaded PHP 5.2.1 and it's not happening but I can't really be sure weather it's solved or not. Especially since i can't find any mention of it in the bug tracking system!

I can always suppress the warning and everything would work fine. But it just doesn't seem right to me. Hope someone can shed some light on this.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-16 06:31 UTC] helly@php.net
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

The second parameter is available since 5.2.0. So if itis not existing, you must be using 5.0.* or 5.1.*.
 [2007-04-16 10:14 UTC] mistknight at gmail dot com
Sorry for that. But I've searched the documentation top to bottom without finding any notes about having this added in 5.2 and later.

I'm beginning to worry I'm searching in outdated documentation or something. May I trouble you further with pointing me to the documentation? My apologies again for wasting your time.
 [2007-04-16 13:18 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2007-04-16 13:21 UTC] bjori@php.net
Heh. That was supposed to say:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 21:01:31 2025 UTC