]> git.mjollnir.org Git - moodle.git/commitdiff
Explicit casting to (bool) may help 4.2.3
authormoodler <moodler>
Fri, 16 May 2003 04:47:40 +0000 (04:47 +0000)
committermoodler <moodler>
Fri, 16 May 2003 04:47:40 +0000 (04:47 +0000)
admin/index.php

index 5939f0dfc00f5907245268db810888ba389e9c5c..d5d79b3ee35fdfab33c1935a2c881806b8db48cc 100644 (file)
 
     $documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
 
-    if (!ini_get('short_open_tag')) {
+    if (!(bool)ini_get('short_open_tag')) {
         error("The PHP server variable 'short_open_tag' is not turned on - $documentationlink");
     }
 
-    if (!ini_get('magic_quotes_gpc')) {
+    if (!(bool)ini_get('magic_quotes_gpc')) {
         error("The PHP server variable 'magic_quotes_gpc' is not turned on - $documentationlink");
     }
-    if (ini_get('magic_quotes_runtime')) {
+    if ((bool)ini_get('magic_quotes_runtime')) {
         error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink");
     }
 
-    if (!ini_get('file_uploads')) {
+    if (!(bool)ini_get('file_uploads')) {
         error("The PHP server variable 'file_uploads' is not turned on - $documentationlink");
     }
 
-    if (ini_get('session.auto_start')) {
+    if ((bool)ini_get('session.auto_start')) {
         error("The PHP server variable 'session.auto_start' should be Off - $documentationlink");
     }
 
 
 /// Check that sessions are supported
 
-    if (!is_readable(ini_get('session.save_path')) and !ini_get('safe_mode')) {
+    if (!is_readable(ini_get('session.save_path')) and !(bool)ini_get('safe_mode')) {
         $sessionpath = ini_get('session.save_path');
         notify("Warning: It appears your server does not support sessions (session.save_path = '$sessionpath')");
     }