Jump to content

Recommended Posts

[PrestaShopException]

Property Product->reference is not valid

at line 837 in file classes/ObjectModel.php

831. 832. 			$message = $this->validateField($field, $this->$field);833. 			if ($message !== true)834. 			{835. 				if ($die)836. 					throw new PrestaShopException($message);837. 				return $error_return ? $message : false;838. 			}839. 		}840. 841. 		return true;
Link to comment
Share on other sites

This code evaluates the reference.

    /**
     * Check for product reference validity
     *
     * @param string $reference Product reference to validate
     * @return boolean Validity is ok or not
     */
    public static function isReference($reference)
    {
        return preg_match('/^[^<>;={}]*$/u', $reference);
    }
Link to comment
Share on other sites

×
×
  • Create New...