File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,11 @@ repos:
103103 entry : bash ./test/assert-utils-used.bash
104104 language : system
105105 files : \.php$
106- exclude : ^resources/lib/utils\.php$
106+ exclude : |
107+ (?x)^(
108+ ^resources/lib/utils\.php$|
109+ ^test/.*\.php$|
110+ )$
107111 - id : assert-exceptions-used
108112 name : Assert exceptions are used
109113 entry : bash ./test/assert-exceptions-used.bash
Original file line number Diff line number Diff line change 2020 This will throw an exception rather than returning ` false ` .
2121- No code should call ` mb_detect_encoding() ` , instead ` \mbDetectEncoding() ` .
2222 This will enable strict mode and throw an exception rather than returning ` false ` .
23+ - No code should call ` intval() ` , instead ` \str2int() ` .
24+ This will enable strict mode and throw an exception rather than issuing a warning.
2325- ` UnityHTTPD ` 's user-facing error functionality (ex: ` badRequest ` ) should only be called from ` webroot/**/*.php ` .
2426 ` resources/**/*.php ` should throw exceptions instead.
2527- all pages under ` webroot/admin/ ` must check for ` $USER->isAdmin() ` and call ` UnityHTTPD::forbidden() ` if not admin.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ declare -A utils=(
1010 [" json_encode" ]=" jsonEncode"
1111 [" mb_detect_encoding" ]=" mbDetectEncoding"
1212 [" mb_convert_encoding" ]=" mbConvertEncoding"
13+ [" intval" ]=" str2int"
1314)
1415
1516rc=0
You can’t perform that action at this time.
0 commit comments