ht_product_schema.php error

Open to all! Ask other shopowners for help.
Post Reply
Omar_one
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

ht_product_schema.php error

Post by Omar_one »

Hello,
There is error on the error_log

Code: Select all

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/hattufi/public_html/shop/includes/modules/header_tags/ht_product_schema.php on line 30
PHP Warning:  Illegal string offset 'image' in /home/xxxx/public_html/shop/includes/modules/header_tags/ht_product_schema.php on line 31
I appreciate your help
Omar


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: ht_product_schema.php error

Post by ecartz »

Do you have a column images or products_images in one of the tables that get called? E.g. products, products_description, specials? Or if this only happens on a particular page, what tables are used on that page?

As a workaround, you could change line 30 to

Code: Select all

        $products_image = (is_array($images) && ( count($images) > 0 ))
Omar_one
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: ht_product_schema.php error

Post by Omar_one »

ecartz wrote: Tue Aug 16, 2022 10:40 am Do you have a column images or products_images in one of the tables that get called? E.g. products, products_description, specials? Or if this only happens on a particular page, what tables are used on that page?

As a workaround, you could change line 30 to

Code: Select all

        $products_image = (is_array($images) && ( count($images) > 0 ))
Thank you @ecartz you are the master ,, there was an products_images column in products left from old database when it was updated


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply