From 3ea9432d43c8a53934ff01c861bde35d22235760 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 2 Jan 2013 22:15:43 +0100 Subject: [PATCH] fixing undefined variable $l --- apps/files/ajax/upload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 0909a3f077..8513736835 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -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: ')