diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-12 21:41:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 21:41:58 +0200 |
commit | 0d930454a2892715e691f9c7713e26a3bb4ee96c (patch) | |
tree | 770197f23a6ec512f54bd22578ec971f53408dc3 /application/container/ContainerBuilder.php | |
parent | 4af591ff3c5db4dea5b6c437527f6f9b12917570 (diff) | |
parent | d52ab0b1e99aa0c494f389092dce1e926296032d (diff) | |
download | Shaarli-0d930454a2892715e691f9c7713e26a3bb4ee96c.tar.gz Shaarli-0d930454a2892715e691f9c7713e26a3bb4ee96c.tar.zst Shaarli-0d930454a2892715e691f9c7713e26a3bb4ee96c.zip |
Merge pull request #1553 from ArthurHoaro/fix/404-page
Properly handle 404 errors
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r-- | application/container/ContainerBuilder.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index 58067c99..55bb51b5 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -10,6 +10,7 @@ use Shaarli\Config\ConfigManager; | |||
10 | use Shaarli\Feed\FeedBuilder; | 10 | use Shaarli\Feed\FeedBuilder; |
11 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
12 | use Shaarli\Front\Controller\Visitor\ErrorController; | 12 | use Shaarli\Front\Controller\Visitor\ErrorController; |
13 | use Shaarli\Front\Controller\Visitor\ErrorNotFoundController; | ||
13 | use Shaarli\History; | 14 | use Shaarli\History; |
14 | use Shaarli\Http\HttpAccess; | 15 | use Shaarli\Http\HttpAccess; |
15 | use Shaarli\Netscape\NetscapeBookmarkUtils; | 16 | use Shaarli\Netscape\NetscapeBookmarkUtils; |
@@ -149,6 +150,9 @@ class ContainerBuilder | |||
149 | ); | 150 | ); |
150 | }; | 151 | }; |
151 | 152 | ||
153 | $container['notFoundHandler'] = function (ShaarliContainer $container): ErrorNotFoundController { | ||
154 | return new ErrorNotFoundController($container); | ||
155 | }; | ||
152 | $container['errorHandler'] = function (ShaarliContainer $container): ErrorController { | 156 | $container['errorHandler'] = function (ShaarliContainer $container): ErrorController { |
153 | return new ErrorController($container); | 157 | return new ErrorController($container); |
154 | }; | 158 | }; |