12.07.2018 07:57
|
|
crimle
Name: crimle
09.01.2012
Posts: 50
|
Parameter must be an array or an object that implements Countable
In the Frontend I have this error message:
Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/2b/5/50fa6fe3f0/public_html/components/com_jshopping/templates/default/product/product_default.php on line 154
It is displayed just above the button [Add to shopping cart]. Nevertheless the products can be added to the shopping cart despite the error message.
Kind regards
Christof
Joomla: 3.8.10 JoomShopping: 4.17.2 PHP: 7.2.5 MySQL: 5.0.12-dev Website Url: https://hauptsache-handgemacht.ch/produkte-shop/product/view/1/14
|
|
12.07.2018 11:23
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Parameter must be an array or an object that implements Countable
Will be fixed in new version joomshopping. (bug in php 7.2)
Disable warning.
|
|
01.09.2018 21:19
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Parameter must be an array or an object that implements Countable
Will be in 4.18.0
components\com_jshopping\templates\default\product\product_default.php
change code
<?php count($this->product->freeattributes)){?>
TO
<?php if (isset($this->product->freeattributes) && count($this->product->freeattributes)){?>
|
|
02.12.2019 12:06
|
|
reinhardseiler
Name: Reinhard
25.05.2014
Posts: 20
|
Aw: Parameter must be an array or an object that implements Countable
Hallo Joomshoppingteam,
ich habe nach der Aktualisierung auf PHP 7.3 und Joomshopping Version 4.18.3 in der Produktanzeige auch diese Warnung:
Warning: count(): Parameter must be an array or an object that implements Countable in /myhomepage/components/com_jshopping/templates/table/product/product_default.php on line 141
Muss in dem File noch mehr geändert werden?
Mit "keine Fehler berichten" konnte ich das erst einmal unterbinden.
Viele Grüße
Reinhard
Joomla: 3.9.13 JoomShopping: 4.18.3 PHP: 7.3.12
|
|
02.12.2019 19:09
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Parameter must be an array or an object that implements Countable
Use default joomshoppnin template
Template table - for old version joomshopping
Or fix template - See code default template.
Letzte Änderung: 02.12.2019 19:10
|
|
02.12.2019 21:55
|
|
reinhardseiler
Name: Reinhard
25.05.2014
Posts: 20
|
Aw: Parameter must be an array or an object that implements Countable
Danke für die schnelle Antwort
Die Warnung kam auch mit dem default joomshopping template.
Mit der Deklaration "array" in Zeile 141 funktioniert es nun:
<?php if (count((array)$this->product->freeattributes)){?>
|
|
29.03.2020 08:43
|
|
Juergen2912
Name: Juergen
12.09.2014
Posts: 56
|
Aw: Parameter must be an array or an object that implements Countable
Habe ich leider auch.
- Code geändert
- Template ist protostar
- php Fehlermeldungen ausgeschaltet
-Bei 1&1 drei php-Versionen ausprobiert
Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/........../clickandbuilds/Joomla/MyCMS/modules/mod_jshopping_search_extended/mod_jshopping_search_extended.php on line 38
Joomla: 3.9.16 JoomShopping: 4.18.4 PHP: 7.2. und 7.3 und 7.4 Website Url: content.gebrueder-ziegler.de
|
|
31.03.2020 09:19
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Parameter must be an array or an object that implements Countable
Search by Attributes 2.0.8
|
|