Skip to content

Commit c8cca43

Browse files
committed
disable exception handler during testing
1 parent 42ffe33 commit c8cca43

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

defaults/config.ini.default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ account_policy_url = "https://github.com" ; this can be external or a portal pag
1616
allow_die = true ; internal use only
1717
enable_verbose_error_log = true ; internal use only
1818
enable_error_to_user = true ; internal use only
19+
enable_exception_handler = true ; internal use only
1920

2021
[ldap]
2122
uri = "ldap://identity" ; URI of remote LDAP server

deployment/overrides/phpunit/config/config.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ custom_user_mappings_dir = "test/custom_user_mappings"
55
allow_die = false
66
enable_verbose_error_log = false
77
enable_error_to_user = false
8+
enable_exception_handler = false

resources/init.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
use UnityWebPortal\lib\UnityGithub;
1515
use UnityWebPortal\lib\UnityHTTPD;
1616

17-
set_exception_handler(["UnityWebPortal\lib\UnityHTTPD", "exceptionHandler"]);
17+
if (CONFIG["site"]["enable_exception_handler"]) {
18+
set_exception_handler(["UnityWebPortal\lib\UnityHTTPD", "exceptionHandler"]);
19+
}
1820

1921
session_start();
2022

0 commit comments

Comments
 (0)