Jump to content

Error log every seconds


tuhingr

Recommended Posts

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

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

 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...