magento / zf1

ZF1 adopted for Magento 2. Use composer in Magento 2 root to download it.
BSD 3-Clause "New" or "Revised" License
59 stars 61 forks source link

Broken yaml parsing. #21

Open vetaltor opened 5 years ago

vetaltor commented 5 years ago

Exception #0 (Exception): Notice: Undefined variable: line in ../vendor/magento/zendframework1/library/Zend/Config/Yaml.php on line 292

https://github.com/magento/zf1/blob/4df018254c70b5b998b00a8cb1a30760f831ff0d/library/Zend/Config/Yaml.php#L292

vetaltor commented 5 years ago

Also, foreach ($lines as $n => $line) is not equal to while (list($n, $line) = each($lines)) (from original file https://github.com/zendframework/zf1/blob/136735e776f520b081cd374012852cb88cef9a88/library/Zend/Config/Yaml.php#L292). Since it does reset(), and also in PHP7 foreach loop doesn't utilize array pointer.

halfpastfouram commented 4 years ago

Yaml parsing is very slow as well. It would be better to use any other Yaml parser than the ZF1 yaml parser.