php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55142 Incorrect return type stated for yaml_parse() when unable to parse input.
Submitted: 2011-07-05 23:44 UTC Modified: 2011-12-07 04:56 UTC
From: emwebdev at gmail dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-07-05 23:44 UTC] emwebdev at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.yaml-parse%23Return%20Values
---

The documentation states that "NULL is returned if the input cannot be decoded." - this is incorrect. The function actually returns FALSE for invalid input.

Test script:
---------------
// outputs "bool(false)"
var_dump(@yaml_parse("\t"));


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-07 04:55 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&revision=320555
Log: Clarified that parse functions return false for failure. Closes bug #55142.
 [2011-12-07 04:56 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2011-12-07 04:56 UTC] frozenfire@php.net
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-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 07:00:01 2026 UTC