maplefu0602 / spyc

Automatically exported from code.google.com/p/spyc
MIT License
0 stars 0 forks source link

Sequence array mistaken for mapped array #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$array = array("aaa", "bbb", "ccc");
#set arrays internal pointer to next element
next($array);
echo Spyc::YAMLDump($array);

Outputs

---
0: aaa
1: bbb
2: ccc

Instead of

---
- aaa
- bbb
- ccc

To fix this, add "reset($array);" before "$first_key = key($array);" (line 234).

Original issue reported on code.google.com by luukkone...@gmail.com on 25 Jan 2011 at 4:37

GoogleCodeExporter commented 8 years ago
Hi, I wasn't able to reproduce the bug. Could you check it with the latest 
version in SVN trunk?

Original comment by vlad.and...@gmail.com on 2 Jun 2011 at 11:10