Преглед на файлове

Add file exists check for file uploads

Alan Lam преди 5 години
родител
ревизия
cc4a6dc093
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      controllers/test_tester_form.php

+ 1 - 0
controllers/test_tester_form.php

@@ -125,6 +125,7 @@ if($submit) {
 						imagedestroy($output_image);
 
 						if(!$success) throw new Exception(__("Failed to save %s.", $label));
+						if(!file_exists($output_path)) throw new Exception(__("Failed to save %s."));
 					}
 					catch(Exception $e) {
 						$form_exception->addError($e->getMessage());