Skip to content

Commit 284d4ed

Browse files
Merge pull request #60 from familytree365/some-issue-fix
some issues fix
2 parents 2d132c3 + 9fea960 commit 284d4ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Utils/FamilyData.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ public static function getFamily($conn, $families, $obje_ids = [], $sour_ids = [
5454

5555
$chan = $family->getChan();
5656

57+
$husband_key = $parentData? array_search($husb, array_column($parentData, 'gid')) : null;
5758
$husband_key = array_search($husb, array_column($parentData, 'gid'));
5859
$husband_uid = $parentData[$husband_key]['uid'] ?? null;
5960
$husband_id = Person::where('uid', $husband_uid)->first()->id ?? null;
6061

61-
$wife_key = array_search($wife, array_column($parentData, 'gid'));
62+
$wife_key = $parentData? array_search($wife, array_column($parentData, 'gid')): null;
6263
$wife_uid = $parentData[$wife_key]['uid'] ?? null;
6364
$wife_id = Person::where('uid', $wife_uid)->first()->id ?? null;
6465

0 commit comments

Comments
 (0)