Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module shipping_estimator: cast result (as $_POST['zone_country_id'] may not be set) #5955

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

torvista
Copy link
Member

@torvista torvista commented Aug 24, 2023

Strict reporting, php8.3.0beta2, vanilla shop, set shipping estimator to display on cart page, add product, go to cart:

[25-Aug-2023 09:09:03 UTC] Request URI: /zencart/index.php?main_page=shopping_cart, IP address: 127.0.0.1, Language id 1
#0 D:\Github\zencart\includes\modules\shipping_estimator.php(139): zen_debug_error_handler()
#1 D:\Github\zencart\includes\templates\responsive_classic\templates\tpl_shopping_cart_default.php(204): require('D:\Github\zenca...')
#2 D:\Github\zencart\includes\templates\responsive_classic\common\tpl_main_page.php(178): require('D:\Github\zenca...')
#3 D:\Github\zencart\index.php(94): require('D:\Github\zenca...')
--> PHP Warning: Undefined array key "zone_country_id" in D:\Github\zencart\includes\modules\shipping_estimator.php on line 139.

when $_POST['zone_country_id'] is not set, the int casting on $_POST['zone_country_id'] causes a debug, so cast the result instead.

@drbyte drbyte merged commit 2075701 into zencart:v200 Aug 25, 2023
5 checks passed
@torvista torvista deleted the se_module branch August 26, 2023 07:50
@torvista torvista restored the se_module branch October 10, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants