What steps will reproduce the problem?
$t0 = array("titel"=> array("0" => "", 1 => "Dr.", 5 => "Prof.", 6 =>
"Prof. Dr."));
Spyc::YAMLDump($t0);
What is the expected output? What do you see instead?
titel:
0:
1: Dr.
5: Prof.
6: Prof. Dr.
spyck throws an exception: Keys are all screwy. The first one
was zero, now it's "5"
What version of the product are you using? On what operating system?
0.4.5 from svn
Please provide any additional information below.
there should be only *one single* case where a list is dumped as a yaml
array. that is when every key is the next incremented value (+1) starting
from 0 (vektor). every other array should be dumped as yaml hash.
$is_vektor = (array_keys($arr) === range(0, count($arr) - 1))
Original issue reported on code.google.com by robbie.w...@gmail.com on 21 Sep 2009 at 1:33
Original issue reported on code.google.com by
robbie.w...@gmail.com
on 21 Sep 2009 at 1:33