-
Notifications
You must be signed in to change notification settings - Fork 8
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 $patternData["lineages"] for being an array #8
base: master
Are you sure you want to change the base?
Conversation
@@ -40,6 +40,10 @@ public function inherit() { | |||
|
|||
foreach ($storePatternData as $patternStoreKey => $patternData) { | |||
|
|||
if ($patternData["lineages"] === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($patternData["lineages"] === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails with PHP Notice: Undefined index: lineages
@@ -40,6 +40,10 @@ public function inherit() { | |||
|
|||
foreach ($storePatternData as $patternStoreKey => $patternData) { | |||
|
|||
if ($patternData["lineages"] === false) { | |||
$patternData["lineages"] = array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$patternData["lineages"] = array(); |
@@ -40,6 +40,10 @@ public function inherit() { | |||
|
|||
foreach ($storePatternData as $patternStoreKey => $patternData) { | |||
|
|||
if ($patternData["lineages"] === false) { | |||
$patternData["lineages"] = array(); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} |
if ($patternData["lineages"] === false) { | ||
$patternData["lineages"] = array(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($patternData["lineages"] === false) { | ||
$patternData["lineages"] = array(); | ||
} | ||
|
||
if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) { | |
if (isset($patternData["lineages"]) && is_array($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) { |
If
$patternData["lineages"]
equalsfalse
, make it an empty array to prevent php warning: