Explorar el Código

Fix undef access in dumper

Jordi Boggiano hace 6 años
padre
commit
bd619e52b3
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/Packagist/WebBundle/Package/SymlinkDumper.php

+ 2 - 2
src/Packagist/WebBundle/Package/SymlinkDumper.php

@@ -716,11 +716,11 @@ class SymlinkDumper
 
             if (isset($deduplicatedVersions[$hash])) {
                 foreach ($uniqKeys as $key) {
-                    $deduplicatedVersions[$hash][$key.'s'][] = $versionArray[$key];
+                    $deduplicatedVersions[$hash][$key.'s'][] = $versionArray[$key] ?? null;
                 }
             } else {
                 foreach ($uniqKeys as $key) {
-                    $filtered[$key.'s'] = [$versionArray[$key]];
+                    $filtered[$key.'s'] = [$versionArray[$key] ?? null];
                 }
                 $deduplicatedVersions[$hash] = $filtered;
             }