If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / "$currentPage != 0" expression in admin/countries.php

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

Started by yesaul on 9 Mar 2023, 6:26 PM · Views: 4,061

Results 1 to 6 of 6
9 Mar 2023, 6:26 PM
#1
yesaul avatar

yesaul

New Zenner

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

Post #1 by yesaul

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

9 Mar 2023, 7:03 PM
#2
swguy avatar

swguy

Administrator

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

Post #2 by swguy

Thanks for taking the time to report this. Investigating.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Mar 2023, 7:09 PM
#3
swguy avatar

swguy

Administrator

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

Post #3 by swguy

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

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Mar 2023, 8:02 PM
#4
yesaul avatar

yesaul

New Zenner

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

Post #4 by yesaul

Copy grabbed from Github seems working faultlessly.

Thank you for support and sorry for fuss

9 Mar 2023, 8:13 PM
#5
lat9 avatar

lat9

Administrator

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

Post #5 by lat9

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!

9 Mar 2023, 8:25 PM
#6
swguy avatar

swguy

Administrator

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

Post #6 by swguy

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.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.