Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch '2.0' into 2.1

* 2.0:
  [Yaml] fixed unneeded BC break
  [DependencyInjection] fixed a bug in the YAML dumper where references where not converted to the @ notation
  [Yaml] fixed typo
  updated VERSION for 2.0.22
  update CONTRIBUTORS for 2.0.22
  updated CHANGELOG for 2.0.22

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
  • Loading branch information...
commit 96e5a16cb3fd8efa3211525a629bf92460662cf3 2 parents 6cd2da8 + c03a65c
Fabien Potencier authored January 17, 2013

Showing 1 changed file with 4 additions and 8 deletions. Show diff stats Hide diff stats

  1. 12  Dumper/YamlDumper.php
12  Dumper/YamlDumper.php
@@ -184,11 +184,7 @@ private function addParameters()
184 184
             return '';
185 185
         }
186 186
 
187  
-        if ($this->container->isFrozen()) {
188  
-            $parameters = $this->prepareParameters($this->container->getParameterBag()->all());
189  
-        } else {
190  
-            $parameters = $this->container->getParameterBag()->all();
191  
-        }
  187
+        $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isFrozen());
192 188
 
193 189
         return $this->dumper->dump(array('parameters' => $parameters), 2);
194 190
     }
@@ -258,12 +254,12 @@ private function getParameterCall($id)
258 254
      *
259 255
      * @return array
260 256
      */
261  
-    private function prepareParameters($parameters)
  257
+    private function prepareParameters($parameters, $escape = true)
262 258
     {
263 259
         $filtered = array();
264 260
         foreach ($parameters as $key => $value) {
265 261
             if (is_array($value)) {
266  
-                $value = $this->prepareParameters($value);
  262
+                $value = $this->prepareParameters($value, $escape);
267 263
             } elseif ($value instanceof Reference) {
268 264
                 $value = '@'.$value;
269 265
             }
@@ -271,7 +267,7 @@ private function prepareParameters($parameters)
271 267
             $filtered[$key] = $value;
272 268
         }
273 269
 
274  
-        return $this->escape($filtered);
  270
+        return $escape ? $this->escape($filtered) : $filtered;
275 271
     }
276 272
 
277 273
     /**

0 notes on commit 96e5a16

Please sign in to comment.
Something went wrong with that request. Please try again.