Преглед на файлове

Fix undef var issue when removing a json config key

Jordi Boggiano преди 12 години
родител
ревизия
02f6a32d08
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      src/Composer/Json/JsonManipulator.php

+ 1 - 0
src/Composer/Json/JsonManipulator.php

@@ -270,6 +270,7 @@ class JsonManipulator
             }
 
             $out = '{' . $this->newline;
+            $elems = array();
             foreach ($data as $key => $val) {
                 $elems[] = str_repeat($this->indent, $depth + 2) . JsonFile::encode($key). ': '.$this->format($val, $depth + 1);
             }