Browse Source

fix empty

Idleman 8 years ago
parent
commit
10f5d6a2bc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      action.php

+ 1 - 1
action.php

@@ -249,7 +249,7 @@ switch ($_['action']){
 			$sketch = Sketch::getById($resource->sketch);
 			$ext = getExt($_FILES['file']['name']);
 			if($myUser->id != $sketch->owner) throw new Exception("Seul le propriétaire du sketch peux faire ça");
-			if(!empty(ALLOWED_RESOURCE_FILE) && !in_array($ext,explode(',',ALLOWED_RESOURCE_FILE))) throw new Exception('Extensions autorisées '.ALLOWED_RESOURCE_FILE);
+			if(ALLOWED_RESOURCE_FILE!='' && !in_array($ext,explode(',',ALLOWED_RESOURCE_FILE))) throw new Exception('Extensions autorisées '.ALLOWED_RESOURCE_FILE);
 			if($_FILES['file']['size']>ALLOWED_RESOURCE_SIZE) throw new Exception('Taille maximum autorisée '.ALLOWED_RESOURCE_SIZE.' o');
 			$name = $resource->id;
 			$folder = SKETCH_PATH.$name;