浏览代码

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);
             }