summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-10-29 16:22:59 +0100
committerGreg Roach <greg@subaqua.co.uk>2021-10-29 16:22:59 +0100
commit41acc92b0fa7f1cfb293f47f77a9b2aaf668b765 (patch)
treec2c2688fd29421d10bd46f4bc89fb459200d83e3 /app
parentdd71ff6b9f8508a26dabb8d3203ec5b96f870208 (diff)
downloadwebtrees-41acc92b0fa7f1cfb293f47f77a9b2aaf668b765.tar.gz
webtrees-41acc92b0fa7f1cfb293f47f77a9b2aaf668b765.tar.bz2
webtrees-41acc92b0fa7f1cfb293f47f77a9b2aaf668b765.zip
Fix: unnecessary/incorrect checks
Diffstat (limited to 'app')
-rw-r--r--app/Http/RequestHandlers/AddParentToIndividualPage.php2
-rw-r--r--app/Statistics/Repository/FamilyRepository.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/Http/RequestHandlers/AddParentToIndividualPage.php b/app/Http/RequestHandlers/AddParentToIndividualPage.php
index 5c12b98ca5..47e62ae929 100644
--- a/app/Http/RequestHandlers/AddParentToIndividualPage.php
+++ b/app/Http/RequestHandlers/AddParentToIndividualPage.php
@@ -69,7 +69,7 @@ class AddParentToIndividualPage implements RequestHandlerInterface
assert(is_string($xref));
$sex = $request->getAttribute('sex');
- assert(is_string($xref));
+ assert(is_string($sex));
$individual = Registry::individualFactory()->make($xref, $tree);
$individual = Auth::checkIndividualAccess($individual, true);
diff --git a/app/Statistics/Repository/FamilyRepository.php b/app/Statistics/Repository/FamilyRepository.php
index c8ab93f933..b5b82e0728 100644
--- a/app/Statistics/Repository/FamilyRepository.php
+++ b/app/Statistics/Repository/FamilyRepository.php
@@ -1128,7 +1128,7 @@ class FamilyRepository
$wife = $family->wife();
if ($husb && ($husb->getAllDeathDates() || !$husb->isDead()) && $wife && ($wife->getAllDeathDates() || !$wife->isDead())) {
- if ($family !== null && $family->canShow()) {
+ if ($family->canShow()) {
if ($type === 'list') {
$top10[] = '<li><a href="' . e($family->url()) . '">' . $family->fullName() . '</a> (' . $age . ')' . '</li>';
} else {