tuhingr Posted December 24, 2022 Share Posted December 24, 2022 Every seconds getting error, how to fix it? Please help! Prestashop 1.7.8.8 [24-Dec-2022 10:47:43 Asia/Dhaka] PHP Warning: Declaration of Link::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $ipa = 0, $force_routes = false, $relativeProtocol = false, $addAnchor = false, $extraParams = Array) should be compatible with LinkCore::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) in /home/-----/public_html/override/classes/Link.php on line 67 Link to comment Share on other sites More sharing options...
ComGrafPL Posted December 24, 2022 Share Posted December 24, 2022 Whats your PHP version? Link to comment Share on other sites More sharing options...
ps8modules Posted December 24, 2022 Share Posted December 24, 2022 Hi, /override/classes/Link.php not compatible with your version of Prestashop. If you give us the code from Link.php and the entire function Link::getProductLink(... we will try to give you the repaired part. Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 24, 2022 Share Posted December 24, 2022 Hi, in your override, you use and old code without some elements in definition of this function. Your code getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $ipa = 0, $force_routes = false, $relativeProtocol = false, $addAnchor = false, $extraParams = Array) the new one getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) If you compare, you need to add this code at the end , bool $addAnchor = true But, in the function you need to check if this function is call for the parent one, like parent::getProductLink($product, $alias, $category, $ean13, $idLang, $idShop, $ipa, $force_routes, $relativeProtocol, $addAnchor, $extraParams) you just need to put this code add the end of call , $addAnchor 1 Link to comment Share on other sites More sharing options...
tuhingr Posted December 25, 2022 Author Share Posted December 25, 2022 On 12/24/2022 at 2:33 PM, ComGrafPL said: Whats your PHP version? PHP 7.4 Link to comment Share on other sites More sharing options...
tuhingr Posted December 25, 2022 Author Share Posted December 25, 2022 I think it was clean url module issue, but not sure. Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 25, 2022 Share Posted December 25, 2022 Il y a 2 heures, tuhingr a dit : I think it was clean url module issue, but not sure. Look at the override code, the module is quoted if the override was installed by the module. Link to comment Share on other sites More sharing options...
tuhingr Posted December 26, 2022 Author Share Posted December 26, 2022 20 hours ago, Mediacom87 said: Look at the override code, the module is quoted if the override was installed by the module. , $addAnchor May I add this code end of the line 67? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now