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

Fixing the bug that appeared when anonymize customer last name option has been added. #89

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

Oksydan
Copy link
Contributor

@Oksydan Oksydan commented Dec 9, 2020

Questions Answers
Description? Fixing the bug that appeared when anonymize customer last name option has been added.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/PrestaShop#22222.
How to test? Issue describes it enough.

@@ -65,7 +65,7 @@ public function display()
$productComment['content'] = htmlentities($productComment['content']);
$productComment['date_add'] = $dateFormatter->format($dateAdd);

if ($isLastNameAnynomus) {
if ($isLastNameAnynomus && isset($productComment['firstname']) && isset($productComment['lastname'])) {

Choose a reason for hiding this comment

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

Hello

What's the idea behind checking if firstname is set if we don't use it in the condition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi,
isset($productComment['firstname']) && isset($productComment['lastname']) - for deleting account firstname and lastname is not set. I just want to be sure that nothing weird are going to happen when first name will not be available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, you are right. Check exists on line 74.

@NeOMakinG
Copy link

CSFixer is red, please run it :)

@PierreRambaud
Copy link
Contributor

Cs fixer is red for a bad reason.
We update the configuration here #90

Copy link
Contributor

@PierreRambaud PierreRambaud left a comment

Choose a reason for hiding this comment

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

Please rebase your pull request

@Oksydan
Copy link
Contributor Author

Oksydan commented Dec 11, 2020

@PierreRambaud I did it against latest dev branch with your CS fixer changes.

@atomiix
Copy link
Contributor

atomiix commented Dec 11, 2020

@Oksydan I don't know how you rebased your PR but something's wrong 🤔, you shouldn't see someone else's commits on your PR.

@Oksydan
Copy link
Contributor Author

Oksydan commented Dec 15, 2020

@atomiix
branch fixed

@khouloudbelguith
Copy link

Hi @Oksydan,

It is ok ✔️
image

Thanks!

@khouloudbelguith khouloudbelguith added this to the 4.2.2 milestone Dec 21, 2020
@PierreRambaud PierreRambaud merged commit 7c004f7 into PrestaShop:dev Dec 21, 2020
@PierreRambaud
Copy link
Contributor

Thank you @Oksydan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null is displayed instead of Deleted account when option to anonymize is set to Yes in product comment
5 participants