Doc #60769 [Opn->Csd]: typo in callback example http://www.php.net/function.filter-var
| From: | frozenfire@php.net | Date: | Sat, 21 Jan 2012 22:56:13 +0000 |
| Subject: | Doc #60769 [Opn->Csd]: typo in callback example http://www.php.net/function.filter-var | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7809@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60769&edit=1
ID: 60769
Updated by: frozenfire@php.net
Reported by: owenmck at gmail dot com
Summary: typo in callback example
http://www.php.net/function.filter-var
-Status: Open
+Status: Closed
Type: Documentation Problem
-Package: *General Issues
+Package: Documentation problem
Operating System: any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: frozenfire
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
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/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-01-21 22:55:49] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=322551
Log: Rewrote callback filter example. Closes bug #60769.
------------------------------------------------------------------------
[2012-01-16 14:19:50] owenmck at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.filter-var
---
callback should return the value it was given, not an object.
i.e.:
return $ret //wrong should be return $ret->val
NB: using $ret as currently suggested results in PHP Catchable fatal error: Object of class
stdClass could not be converted to string
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60769&edit=1