Development

Changeset 28183

You must first sign up to be able to contribute.

Changeset 28183

Show
Ignore:
Timestamp:
02/22/10 14:33:56 (5 years ago)
Author:
FabianLange
Message:

[yaml] fixed missing newline in sfYamlParser when parsing certain symfony core files (fixes #8321)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • components/yaml/branches/1.0/lib/sfYamlParser.php

    r28178 r28183  
    197197      else 
    198198      { 
    199         if (1 == count($this->lines)) 
     199        // 1-liner followed by newline 
     200        if (2 == count($this->lines) && empty($this->lines[1])) 
    200201        { 
    201202          $value = sfYamlInline::load($this->lines[0]); 
     
    548549    $value = str_replace(array("\r\n", "\r"), "\n", $value); 
    549550 
    550     // remove trailing newlines 
    551     $value = rtrim($value, "\n"); 
     551    if (!preg_match("#\n$#", $value)) 
     552    { 
     553      $value .= "\n"; 
     554    } 
    552555 
    553556    // strip YAML header