From d6560bf460e9c5313a85af787cd7c8a67634ceaa Mon Sep 17 00:00:00 2001 From: fisharebest Date: Thu, 18 Jul 2013 19:58:59 +0000 Subject: Comparing GedcomRecords needs === rather than == as the same record will always be the same object --- library/WT/Controller/Fanchart.php | 2 +- library/WT/Controller/Lifespan.php | 2 +- library/WT/Fact.php | 2 +- library/WT/Family.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/WT/Controller/Fanchart.php b/library/WT/Controller/Fanchart.php index e09d183db2..9a3353c9c4 100644 --- a/library/WT/Controller/Fanchart.php +++ b/library/WT/Controller/Fanchart.php @@ -335,7 +335,7 @@ class WT_Controller_Fanchart extends WT_Controller_Chart { $html.= '
'.WT_I18N::translate('Sibling').''; } foreach ($children as $sibling) { - if ($sibling == $person) { + if ($sibling === $person) { $html.= '
   '.$sibling->getFullName().''; } } diff --git a/library/WT/Controller/Lifespan.php b/library/WT/Controller/Lifespan.php index 0271965738..22a097a497 100644 --- a/library/WT/Controller/Lifespan.php +++ b/library/WT/Controller/Lifespan.php @@ -221,7 +221,7 @@ class WT_Controller_Lifespan extends WT_Controller_Page { $this->pids[]=$parent->getXref(); } foreach ($family->getChildren() as $sibling) { - if ($person != $sibling) { + if ($person !== $sibling) { $this->pids[]=$sibling->getXref(); } } diff --git a/library/WT/Fact.php b/library/WT/Fact.php index 36545261bb..d2b4fffc0b 100644 --- a/library/WT/Fact.php +++ b/library/WT/Fact.php @@ -342,7 +342,7 @@ class WT_Fact { // Facts from same families stay grouped together // Keep MARR and DIV from the same families from mixing with events from other FAMs // Use the original order in which the facts were added - if ($a->parent instanceof WT_Family && $b->parent instanceof WT_Family && $a->parent != $b->parent) { + if ($a->parent instanceof WT_Family && $b->parent instanceof WT_Family && $a->parent !== $b->parent) { return $a->sortOrder - $b->sortOrder; } diff --git a/library/WT/Family.php b/library/WT/Family.php index ad40eb41a5..b793dc1614 100644 --- a/library/WT/Family.php +++ b/library/WT/Family.php @@ -126,7 +126,7 @@ class WT_Family extends WT_GedcomRecord { // Find the spouse of a person - or create a dummy person if this family // record is missing one of the spouses. function getSpouse(WT_Individual $person, $access_level=WT_USER_ACCESS_LEVEL) { - if ($person == $this->getWife()) { + if ($person === $this->getWife()) { return $this->getHusband(); } else { return $this->getWife(); -- cgit v1.3