diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-08-27 12:04:36 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-08-27 12:04:36 +0200 |
commit | 7e3dc0ba98bf019c2804e5c74fb6061b16fb712f (patch) | |
tree | f0a333e9e009d78d59c1e4823f766625bc2bb255 /application/front | |
parent | af41d5ab5d2bd3ba64d052c997bc6afa6966a63c (diff) | |
download | Shaarli-7e3dc0ba98bf019c2804e5c74fb6061b16fb712f.tar.gz Shaarli-7e3dc0ba98bf019c2804e5c74fb6061b16fb712f.tar.zst Shaarli-7e3dc0ba98bf019c2804e5c74fb6061b16fb712f.zip |
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.:
Diffstat (limited to 'application/front')
-rw-r--r-- | application/front/controller/visitor/ShaarliVisitorController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php index 47057d97..f17c8ed3 100644 --- a/application/front/controller/visitor/ShaarliVisitorController.php +++ b/application/front/controller/visitor/ShaarliVisitorController.php | |||
@@ -58,10 +58,11 @@ abstract class ShaarliVisitorController | |||
58 | { | 58 | { |
59 | $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); | 59 | $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); |
60 | $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); | 60 | $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); |
61 | $this->assignView('plugin_errors', $this->container->pluginManager->getErrors()); | ||
62 | 61 | ||
63 | $this->executeDefaultHooks($template); | 62 | $this->executeDefaultHooks($template); |
64 | 63 | ||
64 | $this->assignView('plugin_errors', $this->container->pluginManager->getErrors()); | ||
65 | |||
65 | return $this->container->pageBuilder->render($template, $this->container->basePath); | 66 | return $this->container->pageBuilder->render($template, $this->container->basePath); |
66 | } | 67 | } |
67 | 68 | ||