Skip to content

Commit

Permalink
Merge pull request #429 from razvanbalosin/master
Browse files Browse the repository at this point in the history
ProductPartitions::showAdGroupTree() - Check if child index was already exists
  • Loading branch information
fiboknacky authored Dec 20, 2017
2 parents 455cdbd + 9936111 commit 83e6297
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ public static function showAdGroupTree(AdWordsServices $adWordsServices,
if ($page->getEntries() !== null) {
$totalNumEntries = $page->getTotalNumEntries();
foreach ($page->getEntries() as $adGroupCriterion) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
if (!array_key_exists($adGroupCriterion->getCriterion()->getId(), $children)) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
}

if ($adGroupCriterion->getCriterion()->getParentCriterionId()
!== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ public static function showAdGroupTree(AdWordsServices $adWordsServices,
if ($page->getEntries() !== null) {
$totalNumEntries = $page->getTotalNumEntries();
foreach ($page->getEntries() as $adGroupCriterion) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
if (!array_key_exists($adGroupCriterion->getCriterion()->getId(), $children)) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
}

if ($adGroupCriterion->getCriterion()->getParentCriterionId()
!== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ public static function showAdGroupTree(AdWordsServices $adWordsServices,
if ($page->getEntries() !== null) {
$totalNumEntries = $page->getTotalNumEntries();
foreach ($page->getEntries() as $adGroupCriterion) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
if (!array_key_exists($adGroupCriterion->getCriterion()->getId(), $children)) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
}

if ($adGroupCriterion->getCriterion()->getParentCriterionId()
!== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ public static function showAdGroupTree(AdWordsServices $adWordsServices,
if ($page->getEntries() !== null) {
$totalNumEntries = $page->getTotalNumEntries();
foreach ($page->getEntries() as $adGroupCriterion) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
if (!array_key_exists($adGroupCriterion->getCriterion()->getId(), $children)) {
$children[$adGroupCriterion->getCriterion()->getId()] = [];
}

if ($adGroupCriterion->getCriterion()->getParentCriterionId()
!== null) {
Expand Down

0 comments on commit 83e6297

Please sign in to comment.