1
0
Fork 0

Fix parser error if composer.json existing but empty

pull/3845/head
vlakoff 2015-03-14 15:26:53 +01:00
parent d571874461
commit 3a68534d20
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ EOT
return 1;
}
if (file_get_contents($file) === '') {
file_put_contents($file, "{\n}\n");
}
$json = new JsonFile($file);
$composerDefinition = $json->read();
$composerBackup = file_get_contents($json->getPath());