From 7e3dc0ba98bf019c2804e5c74fb6061b16fb712f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 27 Aug 2020 12:04:36 +0200 Subject: Better handling of plugin incompatibility If a PHP is raised while executing plugin hook, Shaarli will display an error instead of rendering the error page (or just ending in fatal error for default hooks). Also added phpErrorHandler which is handled differently that regular errorHandler by Slim.: --- application/container/ShaarliContainer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/container/ShaarliContainer.php') diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php index c4fe753e..9a9a974a 100644 --- a/application/container/ShaarliContainer.php +++ b/application/container/ShaarliContainer.php @@ -4,7 +4,6 @@ declare(strict_types=1); namespace Shaarli\Container; -use http\Cookie; use Shaarli\Bookmark\BookmarkServiceInterface; use Shaarli\Config\ConfigManager; use Shaarli\Feed\FeedBuilder; @@ -30,7 +29,7 @@ use Slim\Container; * @property CookieManager $cookieManager * @property ConfigManager $conf * @property mixed[] $environment $_SERVER automatically injected by Slim - * @property callable $errorHandler Overrides default Slim error display + * @property callable $errorHandler Overrides default Slim exception display * @property FeedBuilder $feedBuilder * @property FormatterFactory $formatterFactory * @property History $history @@ -39,6 +38,7 @@ use Slim\Container; * @property NetscapeBookmarkUtils $netscapeBookmarkUtils * @property PageBuilder $pageBuilder * @property PageCacheManager $pageCacheManager + * @property callable $phpErrorHandler Overrides default Slim PHP error display * @property PluginManager $pluginManager * @property SessionManager $sessionManager * @property Thumbnailer $thumbnailer -- cgit v1.2.3