// Fix assignations in conditions with logical operators + normalize
This commit is contained in:
@@ -1340,7 +1340,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
if (!$new_path = $image->getPathForCreation())
|
||||
$this->errors[] = Tools::displayError('An error occurred during new folder creation');
|
||||
if (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') || !move_uploaded_file($_FILES['image_product']['tmp_name'], $tmpName))
|
||||
if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['image_product']['tmp_name'], $tmpName))
|
||||
$this->errors[] = Tools::displayError('An error occurred during the image upload');
|
||||
else if (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format))
|
||||
$this->errors[] = Tools::displayError('An error occurred while copying image.');
|
||||
|
||||
@@ -79,7 +79,7 @@ class AdminTagsControllerCore extends AdminController
|
||||
public function postProcess()
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1' && Tools::getValue('submitAdd'.$this->table))
|
||||
if ($id = (int)Tools::getValue($this->identifier) && $obj = new $this->className($id) && Validate::isLoadedObject($obj))
|
||||
if (($id = (int)Tools::getValue($this->identifier)) && ($obj = new $this->className($id)) && Validate::isLoadedObject($obj))
|
||||
$obj->setProducts($_POST['products']);
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user