Sfoglia il codice sorgente

bugfix: #236 File-Upload changes files: only write content to file not type

Patrick Kaltenböck 4 anni fa
parent
commit
37d1c79d86
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      system/Models/ProcessFile.php

+ 2 - 2
system/Models/ProcessFile.php

@@ -38,7 +38,7 @@ class ProcessFile extends ProcessAssets
 
 
 		$path = $this->tmpFolder . $this->getFullName();
 		$path = $this->tmpFolder . $this->getFullName();
 
 
-		if(file_put_contents($path, $file))
+		if($file !== false && file_put_contents($path, $file["file"]))
 		{
 		{
 			$size = filesize($path);
 			$size = filesize($path);
 			$size = $this->formatSizeUnits($size);
 			$size = $this->formatSizeUnits($size);
@@ -162,4 +162,4 @@ class ProcessFile extends ProcessAssets
 
 
 		return false;
 		return false;
 	}
 	}
-}
+}