Add failsafe to items.phtml#13086
Merged
Merged
Conversation
We got a warning that $exist is undefined - not entirely sure what the exact scenario was but adding this as a failsafe. Added as default fallback and 'other'.
dmanners
suggested changes
Jan 10, 2018
| break; | ||
|
|
||
| default: | ||
| $exist = null; |
Contributor
There was a problem hiding this comment.
Rather than adding the default options here what about adding an isset check as part of the if wrapping the content display.
Contributor
Author
There was a problem hiding this comment.
Changed as requested. Your suggestion is a neater solution.
samgranger
commented
Jan 10, 2018
samgranger
left a comment
Contributor
Author
There was a problem hiding this comment.
I have removed the extra declarations for $exist and have added an isset check to the if statement as requested.
| break; | ||
|
|
||
| default: | ||
| $exist = null; |
Contributor
Author
There was a problem hiding this comment.
Changed as requested. Your suggestion is a neater solution.
Contributor
|
@samgranger thank you for the quick update. I will process this pr now. |
This should work if the variable is set And the variable is true or 1 or greater
dmanners
approved these changes
Jan 10, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We received a warning that $exist is undefined - not entirely sure what the exact scenario was but adding this as a failsafe.
I have made sure that $exist is defined (null) in the 'default' and 'other' case.
Contribution checklist