]> source.dussan.org Git - nextcloud-server.git/commitdiff
Simplify code
authorLukas Reschke <lukas@owncloud.com>
Sun, 1 Mar 2015 11:35:41 +0000 (12:35 +0100)
committerLukas Reschke <lukas@owncloud.com>
Sun, 1 Mar 2015 11:35:41 +0000 (12:35 +0100)
lib/base.php

index fb93b331d12a04201176dc64f1a3b94730973f2c..1f2e90deefd72cb227ea0a2ba29aa4b760c0b12d 100644 (file)
@@ -577,13 +577,13 @@ class OC {
                        if (self::$CLI) {
                                // Convert l10n string into regular string for usage in database
                                $staticErrors = [];
-                               $i = 0;
                                foreach ($errors as $error) {
                                        echo $error['error'] . "\n";
                                        echo $error['hint'] . "\n\n";
-                                       $staticErrors[$i]['error'] = (string) $error['error'];
-                                       $staticErrors[$i]['hint'] = (string) $error['hint'];
-                                       $i++;
+                                       $staticErrors[] = [
+                                               'error' => (string) $error['error'],
+                                               'hint' => (string) $error['hint'],
+                                       ];
                                }
 
                                try {