fixing composerLockRewrite.php
authorPaul Mehrer <p.mehrer@metaways.de>
Thu, 5 Jan 2017 10:07:16 +0000 (11:07 +0100)
committerPaul Mehrer <p.mehrer@metaways.de>
Thu, 5 Jan 2017 10:28:26 +0000 (11:28 +0100)
php warning occured, fixed that

Change-Id: I644c8be3ac17af59aa7573285bf936f632e4735a
Reviewed-on: http://gerrit.tine20.com/customers/4045
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
scripts/packaging/composer/composerLockRewrite.php

index 277b23e..252b8c5 100644 (file)
@@ -118,6 +118,12 @@ function loopArray(array &$a)
         }
         echo 'found version ' . $package->version . '  for package ' . $package->name . PHP_EOL;
 
+        if (isset($package->source)) {
+            unset($package->source);
+        }
+        if (!isset($package->dist)) {
+            $package->dist = new StdClass();
+        }
         $package->dist->type = $jsonSatis['packages'][$package->name][$package->version]['dist']['type'];
         $package->dist->url = $jsonSatis['packages'][$package->name][$package->version]['dist']['url'];
         $package->dist->reference = $jsonSatis['packages'][$package->name][$package->version]['dist']['reference'];