Przeglądaj źródła

Merge pull request #1998 from Zwyx/patch-1

Add null check for option `key` in `_option` function
El RIDO 1 dzień temu
rodzic
commit
88cf90534d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      bin/administration

+ 1 - 1
bin/administration

@@ -205,7 +205,7 @@ EOT, PHP_EOL;
     private function _option($short, $long)
     {
         foreach (array($short, $long) as $key) {
-            if (array_key_exists($key, $this->_opts)) {
+            if ($key !== null && array_key_exists($key, $this->_opts)) {
                 return $this->_opts[$key];
             }
         }