aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 70ac9d25b..f41e5fd6a 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1943,18 +1943,19 @@ $sort_type = SORT_LOCALE_STRING) {
}
/**
- * Return the state of a php.ini setting.
+ * Return the state of a php.ini setting as a bool
*
- * Normalizes the setting to bool.
+ * @warning Using this on ini settings that are not boolean
+ * will be inaccurate!
*
* @param string $ini_get_arg The INI setting
*
* @return true|false Depending on whether it's on or off
*/
function ini_get_bool($ini_get_arg) {
- $temp = ini_get($ini_get_arg);
+ $temp = strtolower(ini_get($ini_get_arg));
- if ($temp == '1' or strtolower($temp) == 'on' or strtolower($temp) == 'true') {
+ if ($temp == '1' || $temp == 'on' || $temp == 'true') {
return true;
}
return false;