Getting a Warning: strpos()...when adding products.

Hi,

Can anybody help me on how to get rid of the



Warning: strpos() expects parameter 1 to be string, array given in C:\wamp\www\leafbrand\core\templater_plugins\modifier.escape.php on line 24



Everytime I add a product and view it on the store front I get that warning. I have no clue on how to solve this problem. I want to launch my site but this has been holding me back. I’m using Firefox 3.06 and windows IE7 with CS-Cart v2.06. Any help is much appreciated.

I’m getting this same error and can’t figure it out. Has anyone else figured out what this means?



Thank you in advance,



Brandon

I don’t want to be a nag, but unfortunately I can’t figure this out on my own. Does anyone have any ideas?



Thank you,



Brandon

[quote name=‘brandonvd’]I don’t want to be a nag, but unfortunately I can’t figure this out on my own. Does anyone have any ideas?



Thank you,



Brandon[/QUOTE]



Where exactly on the page does it give you the message?



You should have display php warnings disabled on a live environment(ie. your live website) which will get rid of the message. search google or ask your web host how to disable these warnings. it should resemble setting ‘display_errors = Off’ in your php.ini file.

You can see the error here:







I am setting up 2.x on my localhost for now. Once I get everything figured out than I plan on transfering it over to my live host.



Brandon

Well I changed my php.ini setting on my localhost and the error went away. Is there a better way to fix this? What if a host doesn’t have this setting off?



Brandon

[quote name=‘brandonvd’]Well I changed my php.ini setting on my localhost and the error went away. Is there a better way to fix this? What if a host doesn’t have this setting off?



Brandon[/QUOTE]



I don’t know of any hosts that wouldn’t let you edit the php.ini file, most should. The error is caused by this line.



{if $show_features}
{include file="views/products/components/product_features_short_list.tpl" features=$product.product_id|fn_get_product_features_list|escape}
{/if}




in [skin] → customer → views → products → components → buy_now.tpl



you can remove the ‘|escape’ part to get rid of the error for now; but this should be submitted as a bug. Be sure not to add ‘<’ , ‘>’ or other html special characters in your features names, or variants and you should be fine.