summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/PendingChanges.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-10-25 21:31:59 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-10-25 21:31:59 +0100
commit75964c75fd01f8e12e2a313cc89fc2222413a03f (patch)
tree11e854fbe3a11b1c923556f593e27250b3ceec4c /app/Http/RequestHandlers/PendingChanges.php
parent062e72369ad5a64ec7e9a8866dd25ed2c46b14a7 (diff)
downloadwebtrees-75964c75fd01f8e12e2a313cc89fc2222413a03f.tar.gz
webtrees-75964c75fd01f8e12e2a313cc89fc2222413a03f.tar.bz2
webtrees-75964c75fd01f8e12e2a313cc89fc2222413a03f.zip
No need to throw exceptions in assert()
Diffstat (limited to 'app/Http/RequestHandlers/PendingChanges.php')
-rw-r--r--app/Http/RequestHandlers/PendingChanges.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/Http/RequestHandlers/PendingChanges.php b/app/Http/RequestHandlers/PendingChanges.php
index b4a66eeddd..67cae33ddd 100644
--- a/app/Http/RequestHandlers/PendingChanges.php
+++ b/app/Http/RequestHandlers/PendingChanges.php
@@ -33,7 +33,6 @@ use Fisharebest\Webtrees\Services\TreeService;
use Fisharebest\Webtrees\Source;
use Fisharebest\Webtrees\Tree;
use Illuminate\Database\Capsule\Manager as DB;
-use InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
@@ -70,7 +69,7 @@ class PendingChanges implements RequestHandlerInterface
public function handle(ServerRequestInterface $request): ResponseInterface
{
$tree = $request->getAttribute('tree');
- assert($tree instanceof Tree, new InvalidArgumentException());
+ assert($tree instanceof Tree);
$url = $request->getQueryParams()['url'] ?? route('tree-page', ['tree' => $tree->name()]);