Page 1 of 1

ht_product_schema.php error

Posted: Tue Aug 16, 2022 10:28 am
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

Re: ht_product_schema.php error

Posted: Tue Aug 16, 2022 10:40 am
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 ))

Re: ht_product_schema.php error

Posted: Tue Aug 16, 2022 11:56 am
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