ludojlm Posted January 23, 2019 Share Posted January 23, 2019 Hi, I can't access any of my product pages, I always have an error message that says : Warning: htmlspecialchars() expects parameter 1 to be string, array given I know what it means, so I tried to check all occurences of htmlspecialchars() in the core in order to find where an array was passed, and changing it in string if possible. I've already done this with the class Link.php. But I wasn't able to find it, the error doesn't change and I can't find any help on the internet... Does anyone know what to do or at least where to search? Thanks a lot, Link to comment Share on other sites More sharing options...
tdsoft Posted January 24, 2019 Share Posted January 24, 2019 You can disable all external module + Override files from your website for test: https://postimg.cc/0rxsmY1J Go to Advanced Parameters >> Performance, change Disable non PrestaShop modules = Yes Disable all override = Yes If that error is stopped, so some external modules caused that error. you can STOP each module to check 2.Also please check a module which have file head_seo.tpl, Prestashop warning this file Link to comment Share on other sites More sharing options...
ludojlm Posted January 24, 2019 Author Share Posted January 24, 2019 Nope, the error is still there. I'm trying to make a new fresh install on a subdomain to see where the problem could be. Link to comment Share on other sites More sharing options...
sakonn Posted January 17, 2020 Share Posted January 17, 2020 On 1/24/2019 at 10:25 AM, ludojlm said: Nope, the error is still there. I'm trying to make a new fresh install on a subdomain to see where the problem could be. Hello, did you get answer for that? I am getting same error when trying to call that function from tpl file: {ProductCoreOverride::getFrontFeaturesOverride($js_custom_vars.prestashop.language.id, $product.id_product|string_format:"%d")} I am sure both my variables are strings. Link to comment Share on other sites More sharing options...
CatchMeZZo Posted June 4, 2020 Share Posted June 4, 2020 I get the same error. Any one with a fix? Link to comment Share on other sites More sharing options...
AnthonyJane Posted October 22, 2020 Share Posted October 22, 2020 Not sure if this helps anyone but my problem with this error was due to the fact that my variable was null / empty. I had to wrap it in an if ! empty before trying to access it. {if !empty($variablename)} {if $variablename|strpos:"test" !== false} <div>Hi</div> {/if} {/if} 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