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

Check if id_country exists before using the result of the array #23406

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Check if id_country exists before using the result of the array #23406

merged 1 commit into from
Mar 2, 2021

Conversation

PierreRambaud
Copy link
Contributor

@PierreRambaud PierreRambaud commented Feb 25, 2021

Questions Answers
Branch? develop
Description? Since PHP 7.4 you can't use bool as array which is logic. We have to be sure the key exists in the array before using it
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #23402
How to test? Go to Price drop section in the FO and see the magic.
Possible impacts? Please indicate what parts of the software we need to check to make sure everything is alright.

This change is Reviewable

@PierreRambaud PierreRambaud added this to the 1.7.8.0 milestone Feb 25, 2021
@PierreRambaud PierreRambaud requested a review from a team as a code owner February 25, 2021 13:22
@prestonBot prestonBot added develop Branch Bug fix Type: Bug fix labels Feb 25, 2021
Copy link
Contributor

@matks matks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to use a tool like phpstan to find such usage?

@PierreRambaud
Copy link
Contributor Author

Would it be possible to use a tool like phpstan to find such usage?

Yes, and we plan to extend PHPStan integration into more directories :)

@kpodemski kpodemski added the Waiting for QA Status: action required, waiting for test feedback label Feb 25, 2021
@SD1982 SD1982 self-assigned this Mar 1, 2021
@SD1982
Copy link
Contributor

SD1982 commented Mar 2, 2021

LGTM !!
Thanks @PierreRambaud !!

@SD1982 SD1982 added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Mar 2, 2021
@PierreRambaud PierreRambaud merged commit c3db704 into PrestaShop:develop Mar 2, 2021
@PierreRambaud PierreRambaud deleted the fix/23402 branch March 2, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Type: Bug fix develop Branch QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FO] Can't access Prices Drop page
6 participants