Summary | Horde's Yaml parser chokes on legal tabs. |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Assigned |
Priority | 2. Medium |
Owners | mike (at) naberezny (dot) com |
Requester | mpb.mail (at) gmail (dot) com |
Created | 2009-02-08 (4399 days ago) |
Due | |
Updated | 2010-09-24 (3806 days ago) |
Assigned | 2009-02-08 (4399 days ago) |
Resolved | |
Milestone | |
Patch | No |
State ⇒ Assigned
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Horde's Yaml parser chokes on legal tabs.
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
New Attachment: horde_yaml.php
chokes on legal (non-indentation) tabs in Yaml content. The snippet
is also attached to this ticket.
Spyc and Syck have the same bug. (sfYaml does not, but it has other bugs.)
Thanks!
<?php
$yaml0 = "- [ one, two ]\n"; // separated by 2 tabs
$yaml1 = "- [ one, two ]\n"; // separated by 2 spaces
require_once ("Horde/Yaml.php");
require_once ("Horde/Yaml/Dumper.php");
require_once ("Horde/Yaml/Exception.php");
require_once ("Horde/Yaml/Loader.php");
require_once ("Horde/Yaml/Node.php");
print_r (Horde_Yaml::load ($yaml0));
print_r (Horde_Yaml::load ($yaml1));
/*
----------------------------------------------------------------------------
I expect identical output, but I get this:
Array
(
[0] => Array
(
[0] => one, two
)
)
Array
(
[0] => Array
(
[0] => one
[1] => two
)
)
----------------------------------------------------------------------------
*/
?>