|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75029 Empty string should not return FALSE
Submitted: 2017-08-03 12:12 UTC Modified: -
From: Raffael dot Comi at elementare-teilchen dot de Assigned:
Status: Open Package: yaml (PECL)
PHP Version: 7.1.7 OS: debian stretch
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: Raffael dot Comi at elementare-teilchen dot de
New email:
PHP Version: OS:


 [2017-08-03 12:12 UTC] Raffael dot Comi at elementare-teilchen dot de
I'm using version 2.0.0 of php-yaml.

According to, empty streams are valid, they don't have to include a document.
Take the example provided in the spec, where the stream only consists of comments.

Test script:

yaml_parse('#Only comment');

Expected result:
array(0) {


string(0) ""

or even


Actual result:
PHP Warning:  yaml_parse(): end of stream reached without finding document 0



Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Oct 21 16:01:26 2018 UTC