Browse Source

Fix unset order to avoid a warning

Jordi Boggiano 10 năm trước cách đây
mục cha
commit
d18ac81381
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Package/Loader/ValidatingArrayLoader.php

+ 1 - 1
src/Composer/Package/Loader/ValidatingArrayLoader.php

@@ -58,8 +58,8 @@ class ValidatingArrayLoader implements LoaderInterface
             try {
                 $this->versionParser->normalize($this->config['version']);
             } catch (\Exception $e) {
-                unset($this->config['version']);
                 $this->errors[] = 'version : invalid value ('.$this->config['version'].'): '.$e->getMessage();
+                unset($this->config['version']);
             }
         }