]> git.mxchange.org Git - friendica.git/commitdiff
Don't try to build form for "None" backend.
authorfabrixxm <fabrix.xm@gmail.com>
Fri, 14 Dec 2018 13:11:44 +0000 (14:11 +0100)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:12:32 +0000 (09:12 -0500)
Fix #6266

mod/admin.php

index 50244901d0c2d7d08b55cb258eba784f2df5723a..c454b325af4509d4634defdf618a57cf7e0fbf4e 100644 (file)
@@ -1532,12 +1532,14 @@ function admin_page_site(App $a)
        $storage_form_prefix=preg_replace('|[^a-zA-Z0-9]|' ,'', $storage_current_backend);
        
        $storage_form = [];
-       foreach($storage_current_backend::getOptions() as $name => $info) {
-               $type = $info[0];
-               $info[0] = $storage_form_prefix . '_' . $name;
-               $info['type'] = $type;
-               $info['field'] = 'field_' . $type . '.tpl';
-               $storage_form[$name] = $info;
+       if (!is_null($storage_current_backend) && $storage_current_backend != "") {
+               foreach($storage_current_backend::getOptions() as $name => $info) {
+                       $type = $info[0];
+                       $info[0] = $storage_form_prefix . '_' . $name;
+                       $info['type'] = $type;
+                       $info['field'] = 'field_' . $type . '.tpl';
+                       $storage_form[$name] = $info;
+               }
        }