Zen Cart Logo
Forums / Bug Reports / "$currentPage != 0" expression in admin/countries.php

"$currentPage != 0" expression in admin/countries.php

Views: 4,036

Results 1 to 6 of 6
09 Mar 2023, 18:26
#1
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
71
Plugin Contributions:
0

"$currentPage != 0" expression in admin/countries.php

Hello

IMHO $currentPage !=0 expression in admin/countries.php file (lines ##147, 165, 172, 176, 183, 187, 190, 195, 222) should be relaced to $currentPage !== '' (as in some another lines of the same file or probably even better - to !empty($currentPage))

Otherwise variable type conversion does not work correct (at least in PHP v 7.4.25 I am still using) - $currentPage can be empty or a one letter string, but definitely not an integer

Sorry, if I do understand something wrong or if this issue has already been in discussion (I tried to search, but Ihave not found anything). I'll be very thankful for any community opinion

09 Mar 2023, 19:03
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: "$currentPage != 0" expression in admin/countries.php

Thanks for taking the time to report this. Investigating.

09 Mar 2023, 19:09
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: "$currentPage != 0" expression in admin/countries.php

This looks like it's fixed in Github - would you please grab the latest copy of admin/countries.php and retest? Thanks.

https://github.com/zencart/zencart/blob/v158/admin/countries.php

09 Mar 2023, 20:02
#4
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
71
Plugin Contributions:
0

Re: "$currentPage != 0" expression in admin/countries.php

Copy grabbed from Github seems working faultlessly.

Thank you for support and sorry for fuss

09 Mar 2023, 20:13
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: "$currentPage != 0" expression in admin/countries.php

yesaul:

Copy grabbed from Github seems working faultlessly.

Thank you for support and sorry for fuss
Better to have a duplicate report than have the issue remain!

09 Mar 2023, 20:25
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: "$currentPage != 0" expression in admin/countries.php

It's also fun to see people adopting 1.5.8 (even if they hit a few speed bumps along the way). Good luck with your store.