Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
Updated person::$warnings to test the object is created
Browse files Browse the repository at this point in the history
  • Loading branch information
brettminnie committed Jul 2, 2014
1 parent 063d037 commit b6e6445
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Opg/Core/Model/Entity/Person/Person.php
Expand Up @@ -794,12 +794,13 @@ public function getActiveWarnings()
{
$warningBucket = new ArrayCollection();

foreach ($this->warnings as $warning) {
if ($warning->isActive()) {
$warningBucket->add($warning);
if (null !== $this->warnings) {
foreach ($this->warnings as $warning) {
if ($warning->isActive()) {
$warningBucket->add($warning);
}
}
}

return $warningBucket;
}
}

0 comments on commit b6e6445

Please sign in to comment.