Author Topic: Warning: vmpagination.php  (Read 799 times)

marvays

  • Jr. Member
  • **
  • Posts: 206
    • http://marvays.cz
  • Skype Name: marvays
Warning: vmpagination.php
« on: November 22, 2018, 04:51:01 am »
Good morning. What is this error, please:
Code: [Select]
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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2870
  • VirtueMart Version: 3.4
Re: Warning: vmpagination.php
« Reply #1 on: November 22, 2018, 10:51:50 am »
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.
regards
A

Joomla 3.9.1
php 7.1

marvays

  • Jr. Member
  • **
  • Posts: 206
    • http://marvays.cz
  • Skype Name: marvays
Re: Warning: vmpagination.php
« Reply #2 on: November 23, 2018, 19:27:22 pm »
hi.
VirtueMart 3.4.2
Joomla! 3.9.0

display in all pages where is pagination.


GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Warning: vmpagination.php
« Reply #3 on: November 24, 2018, 17:46:26 pm »
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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

marvays

  • Jr. Member
  • **
  • Posts: 206
    • http://marvays.cz
  • Skype Name: marvays
Re: Warning: vmpagination.php
« Reply #4 on: November 24, 2018, 18:40:39 pm »

marvays

  • Jr. Member
  • **
  • Posts: 206
    • http://marvays.cz
  • Skype Name: marvays
Re: Warning: vmpagination.php
« Reply #5 on: November 24, 2018, 18:50:51 pm »
I try delete this:
Code: [Select]
if(!empty($sequence)) {
$sequenceArray = explode( ',', $sequence );
if(count( $sequenceArray>1 )) {
foreach( $sequenceArray as $items ) {
$limits[$items] = JHtml::_( 'select.option', $items );
}
}
}
and look fine :)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9800
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Warning: vmpagination.php
« Reply #6 on: November 26, 2018, 14:36:46 pm »
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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

marvays

  • Jr. Member
  • **
  • Posts: 206
    • http://marvays.cz
  • Skype Name: marvays
Re: Warning: vmpagination.php
« Reply #7 on: November 26, 2018, 15:29:00 pm »
Yes. But i can change to 7.1 or 5.6 . . . if you want.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9800
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Warning: vmpagination.php
« Reply #8 on: December 02, 2018, 23:02:35 pm »
It should work in any relevant php version, but I think at most intersting is php7.2.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

biltong

  • Jr. Member
  • **
  • Posts: 125
    • Starfish Websites
Re: Warning: vmpagination.php
« Reply #9 on: April 10, 2019, 14:59:49 pm »
Hi,

Am am getting this error as well, in PHP error log file, since updating VirtueMart from 3.2.14 to 3.4.2.

Code: [Select]
[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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9800
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Warning: vmpagination.php
« Reply #10 on: April 15, 2019, 14:54:09 pm »
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/