aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/plugins/test
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-08-27 12:04:36 +0200
committerArthurHoaro <arthur@hoa.ro>2020-08-27 12:04:36 +0200
commit7e3dc0ba98bf019c2804e5c74fb6061b16fb712f (patch)
treef0a333e9e009d78d59c1e4823f766625bc2bb255 /tests/plugins/test
parentaf41d5ab5d2bd3ba64d052c997bc6afa6966a63c (diff)
downloadShaarli-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 'tests/plugins/test')
-rw-r--r--tests/plugins/test/test.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/plugins/test/test.php b/tests/plugins/test/test.php
index 2aaf5122..ae5032dd 100644
--- a/tests/plugins/test/test.php
+++ b/tests/plugins/test/test.php
@@ -19,3 +19,8 @@ function hook_test_random($data)
19 19
20 return $data; 20 return $data;
21} 21}
22
23function hook_test_error()
24{
25 new Unknown();
26}