diff --git a/src/Controllers/UploadController.php b/src/Controllers/UploadController.php index cad6b04e..21d677eb 100644 --- a/src/Controllers/UploadController.php +++ b/src/Controllers/UploadController.php @@ -43,7 +43,7 @@ public function upload() } if (is_array($uploaded_files)) { - $response = count($error_bag) > 0 ? $error_bag : array(parent::$success_response); + $response = count($error_bag) > 0 ? $error_bag : parent::$success_response; } else { // upload via ckeditor 'Upload' tab if (is_null($new_filename)) { $response = $error_bag[0]; diff --git a/src/views/index.blade.php b/src/views/index.blade.php index 360eab5a..aa743931 100644 --- a/src/views/index.blade.php +++ b/src/views/index.blade.php @@ -240,7 +240,7 @@ init: function() { var _this = this; // For the closure this.on('success', function(file, response) { - if (response == 'OK') { + if (response === 'OK') { loadFolders(); } else { this.defaultOptions.error(file, response.join('\n'));