diff --git a/app/Functions/Functions.php b/app/Functions/Functions.php
index <HASH>..<HASH> 100644
--- a/app/Functions/Functions.php
+++ b/app/Functions/Functions.php
@@ -690,7 +690,7 @@ class Functions {
 
 			return I18N::translate('husband');
 		case 'wif':
-			if ($person1 && $person1) {
+			if ($person1 && $person2) {
 				foreach ($person1->getSpouseFamilies() as $family) {
 					if ($person2 === $family->getSpouse($person1)) {
 						if ($family->getFacts('_NMR')) {
fix typo (#<I>)