Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/PatternLab/DataInheritance/PatternLabListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public function inherit() {

foreach ($storePatternData as $patternStoreKey => $patternData) {

if ($patternData["lineages"] === false) {
Copy link

Choose a reason for hiding this comment

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

Suggested change
if ($patternData["lineages"] === false) {

Copy link

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

$patternData["lineages"] = array();
Copy link

Choose a reason for hiding this comment

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

Suggested change
$patternData["lineages"] = array();

}
Copy link

Choose a reason for hiding this comment

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

Suggested change
}


Copy link

Choose a reason for hiding this comment

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

Suggested change

if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {
Copy link

Choose a reason for hiding this comment

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

Suggested change
if (isset($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {
if (isset($patternData["lineages"]) && is_array($patternData["lineages"]) && (count($patternData["lineages"]) > 0)) {


$dataLineage = array();
Expand Down