Issues

ZF-11384: Zend_Config_Yaml comment should allow indented comments

Issue Type: Bug Created: 2011-05-17T19:35:39.000+0000 Last Updated: 2011-05-31T02:44:04.000+0000 Status: Resolved Fix version(s): - 1.11.7 (02/Jun/11)

Reporter: Krivich Ekaterina (kiote) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Config

Related issues: - ZF-11329

Attachments:

Description

When commenting lines in yaml-config, comments can be started only from 0-position of string, to be processed correctly (to be ignored). Otherwise, by yaml-specification, comment can be started from any position of string, and text after comment should be ignored.

The patch is only replace {quote} if ($line[0] == '#') { // comment continue; } {quote} in Zend_Config_Yaml to {quote} $line = rtrim(preg_replace("/#.*$/", "", $line)); {quote}

Comments

Posted by Rob Allen (rob) on 2011-05-27T02:01:38.000+0000

Assigned to author of Zend_Config_Yaml

Posted by Adam Lundrigan (adamlundrigan) on 2011-05-31T02:35:35.000+0000

YAML specification indicates that comments can indeed be indented (see http://www.yaml.org/spec/1.2/spec.html#id2780069, Example 6.10). I've committed a fix and unit test to resolve this issue in r24090 and r24091

Posted by Adam Lundrigan (adamlundrigan) on 2011-05-31T02:43:41.000+0000

Merged to release-1.11 in r24092

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts