diff options
author | Andrew Dolgov <[email protected]> | 2017-07-06 22:51:56 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-07-06 22:51:56 +0300 |
commit | 948471a44bd59fb31d9abdd2931a9eda0b5b6931 (patch) | |
tree | 76a69c102eaefd715d5c4ec2d1216bc9e48e55ca /include/sanity_check.php | |
parent | 2953687b7242f77d9bc5cbea7cf21d2fb9f2de1a (diff) |
self url path checking: accept value without an ending slash
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-x | include/sanity_check.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php index f9f6575c8..2f5315edf 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -105,7 +105,9 @@ "Please set SELF_URL_PATH to the correct value for your server (possible value: <b>$ref_self_url_path</b>)"); } - if (isset($_SERVER["HTTP_HOST"]) && SELF_URL_PATH != $ref_self_url_path && (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS)) { + if (isset($_SERVER["HTTP_HOST"]) && + (!defined('_SKIP_SELF_URL_PATH_CHECKS') || !_SKIP_SELF_URL_PATH_CHECKS) && + SELF_URL_PATH != $ref_self_url_path && SELF_URL_PATH != mb_substr($ref_self_url_path, 0, mb_strlen($ref_self_url_path)-1)) { array_push($errors, "Please set SELF_URL_PATH to the correct value detected for your server: <b>$ref_self_url_path</b>"); } |