// Fixed writePostedImageOnDisk()

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14744 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-04-18 16:14:55 +00:00
parent e7ba6ab553
commit f912ae8496
@@ -944,7 +944,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
if ($file['size'] > $this->imgMaxUploadSize)
throw new WebserviceException(sprintf('The image size is too large (maximum allowed is %d KB)', ($this->imgMaxUploadSize/1000)), array(72, 400));
require_once(_PS_ROOT_DIR_.'/images.inc.php');
if ($error = ImageManager::getErrorFromCode($file['error']))
if (ImageManager::validateUpload($file))
throw new WebserviceException('Image upload error : '.$error, array(76, 400));
if (isset($file['tmp_name']) AND $file['tmp_name'] != NULL)
{