]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing undefined variable $l
authorThomas Mueller <thomas.mueller@tmit.eu>
Wed, 2 Jan 2013 21:15:43 +0000 (22:15 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Wed, 2 Jan 2013 21:15:43 +0000 (22:15 +0100)
apps/files/ajax/upload.php

index 0909a3f07768b46c6c0d29c5ca5c7f3f72ef4ad6..8513736835f0c2c13aac78813204e3f416bab992 100644 (file)
@@ -13,9 +13,11 @@ if (!isset($_FILES['files'])) {
        OCP\JSON::error(array('data' => array( 'message' => 'No file was uploaded. Unknown error' )));
        exit();
 }
+
+$l=OC_L10N::get('files');
+
 foreach ($_FILES['files']['error'] as $error) {
        if ($error != 0) {
-               $l=OC_L10N::get('files');
                $errors = array(
                        UPLOAD_ERR_OK=>$l->t('There is no error, the file uploaded with success'),
                        UPLOAD_ERR_INI_SIZE=>$l->t('The uploaded file exceeds the upload_max_filesize directive in php.ini: ')