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

Fix Admin controller shop context #30385

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

PululuK
Copy link
Member

@PululuK PululuK commented Nov 23, 2022

Questions Answers
Branch? develop
Description? Fix Admin controller shop context.
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? TODO.
Related PRs TODO
How to test? TODO
Possible impacts? TODO

@PululuK PululuK requested a review from a team as a code owner November 23, 2022 17:22
@prestonBot
Copy link
Collaborator

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

@prestonBot prestonBot added develop Branch Bug fix Type: Bug fix labels Nov 23, 2022
@@ -2905,7 +2905,8 @@ public function initShopContext()
// Replace existing shop if necessary
if (!$shop_id) {
$this->context->shop = new Shop((int) Configuration::get('PS_SHOP_DEFAULT'));
} elseif ($this->context->shop->id != $shop_id) {
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't keep the elseif and add a else after it?

@PululuK PululuK closed this Nov 25, 2022
@PululuK PululuK reopened this Nov 25, 2022
@FabienPapet
Copy link
Member

Hey @PululuK,

I think this needs a description about why replacing the elseif by else is important

@FabienPapet FabienPapet added the Waiting for author Status: action required, waiting for author feedback label Nov 28, 2022
@PululuK PululuK marked this pull request as draft November 28, 2022 12:25
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 Waiting for author Status: action required, waiting for author feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants