Good morning. What is this error, please:
Warning: count(): Parameter must be an array or an object that implements Countable in /data/www/23045/lukysipy_cz/www/administrator/components/com_virtuemart/helpers/vmpagination.php on line 140
I have latest joomla and latest VM.
Provide more information as to what you are doing when you get this error. As you appear to be the only one reporting it.
Saying that you are on the latest versions means nothing - please state the version you are using.
hi.
VirtueMart 3.4.2
Joomla! 3.9.0
display in all pages where is pagination.
(http://www.imagehosting.cz/thumbs/123cyc.png) (http://www.imagehosting.cz/?v=123cyc.png)
normally means the count($xxx) is not an array or object
you need to backtrace what is being "counted" -- maybe it needs a if(is_array($xxx)) { etc
code is
if(empty($sequence)) {
$sequence = VmConfig::get( 'pagseq', 0 );
}
if(!empty($sequence)) {
$sequenceArray = explode( ',', $sequence );
if(count( $sequenceArray>1 )) {
foreach( $sequenceArray as $items ) {
$limits[$items] = JHtml::_( 'select.option', $items );
}
}
}
what have u got in your pagination sequence in VM config?
must be comma separated
(http://www.imagehosting.cz/thumbs/nastavenla.png) (http://www.imagehosting.cz/?v=nastavenla.png)
I try delete this:
if(!empty($sequence)) {
$sequenceArray = explode( ',', $sequence );
if(count( $sequenceArray>1 )) {
foreach( $sequenceArray as $items ) {
$limits[$items] = JHtml::_( 'select.option', $items );
}
}
}
and look fine :)
Please try our dev version. I think that is fixed. You use php7.2, right? http://dev.virtuemart.net/attachments/download/1149/com_virtuemart.3.4.3.9989_package_or_extract.zip
Yes. But i can change to 7.1 or 5.6 . . . if you want.
It should work in any relevant php version, but I think at most intersting is php7.2.
Hi,
Am am getting this error as well, in PHP error log file, since updating VirtueMart from 3.2.14 to 3.4.2.
[14-Feb-2019 17:44:08 Europe/London] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/xxxxx/public_html/administrator/components/com_virtuemart/helpers/vmpagination.php on line 190
Joomla v3.9.5
PHP 7.2.16
Please test if you have the error also with http://dev.virtuemart.net/attachments/1160/com_virtuemart.3.4.5.10045_package_or_extract.zip
Can you confirm if version 3.6.2 successfully addresses the PHP Warning: count(): Parameter must be an array or an object that implements Countable in administrator/components/com_virtuemart/helpers/vmpagination.php on line 140 issue or advise of an alternative fix.
It is assumed so as I and none of the testers/devs have seen this problem