aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-02 15:46:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-02 15:46:03 +0000
commit926e6b17a34c06ce52852324121f1fd4d89e2a30 (patch)
treeef4cc38beb7354408e820a4bea20425ee149df74 /engine
parent8bb6d8ccc07fccc14bf0404ffd4190b69a658c48 (diff)
downloadelgg-926e6b17a34c06ce52852324121f1fd4d89e2a30.tar.gz
elgg-926e6b17a34c06ce52852324121f1fd4d89e2a30.tar.bz2
Better code and docs or previous.
git-svn-id: http://code.elgg.org/elgg/trunk@7502 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-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;