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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: emwebdev at gmail dot com
New email:
PHP Version: OS:

 

 [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 15:00:02 2026 UTC