|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61923 detect_scalar_type() is not aware of base 60 representation.
Submitted: 2012-05-03 14:04 UTC Modified: 2013-11-18 02:23 UTC
Avg. Score:3.0 ± 0.8
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: mapc777 at hotmail dot com Assigned: bd808 (profile)
Status: Closed Package: yaml (PECL)
PHP Version: 5.3.11 OS: CentOS
Private report: No CVE-ID: None
 [2012-05-03 14:04 UTC] mapc777 at hotmail dot com
When emitting a string that matches the format \d(:\d)+, (e.g. 1:0) it should be 
quoted, as an unquoted scalar of this type is actually representing an integer in 
base 60 according to the documentation at

Test script:
$yaml_string = <<<YAML
node: '1:0'

echo yaml_emit(yaml_parse($yaml_string));

Expected result:
node: '1:0'

Actual result:
node: 1:0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-04 00:52 UTC] mapc777 at hotmail dot com
Expected result should have been
node: "1:0" 

as emit.c only refers to DOUBLE_QUOTED.
 [2013-11-18 02:23 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: bd808
 [2013-11-18 02:23 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2013-11-19 05:47 UTC]
Patch included in 1.1.1 release.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 03:01:32 2024 UTC