Browse code

Behandle Sonderfall des leeren strings in den Vhost-Optionen

Bernd Wurst authored on 12/01/2019 13:43:26
Showing 1 changed files
... ...
@@ -211,6 +211,9 @@ if ($_GET['action'] == 'edit') {
211 211
     DEBUG("PHP: {$php} / Logging: {$logtype}");
212 212
 
213 213
     $old_options = explode(',', $vhost['options']);
214
+    if ($vhost['options'] == '') {
215
+        $old_options = array();
216
+    }
214 217
     $new_options = array();
215 218
     foreach ($old_options as $op) {
216 219
         if (! in_array($op, array('aliaswww', 'forwardwww', 'forwardnowww', 'hsts_subdomains', 'hsts_preload'))) {
... ...
@@ -252,6 +255,7 @@ if ($_GET['action'] == 'edit') {
252 255
             unset($new_options[$key]);
253 256
         }
254 257
     }
258
+    
255 259
 
256 260
     DEBUG($old_options);
257 261
     DEBUG($new_options);