From b96be346de62308321d1191c393c569bfa56094f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 20 Jun 2013 09:12:20 -0400
Subject: [PATCH] Canonize boolean ini_get() results (#1489189)

---
 installer/check.php |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/installer/check.php b/installer/check.php
index fcf3502..122437b 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -139,10 +139,11 @@
     if (extension_loaded($ext)) {
         // MySQL driver requires PHP >= 5.3 (#1488875)
         if ($ext == 'pdo_mysql' && version_compare(PHP_VERSION, '5.3.0', '<')) {
-            $RCI->fail($database, 'PHP >= 5.3 required');
+            $RCI->fail($database, 'PHP >= 5.3 required', null, true);
         }
         else {
             $RCI->pass($database);
+            $found_db_driver = true;
         }
     }
     else {
@@ -151,6 +152,9 @@
         $RCI->na($database, $msg, $source_urls[$ext]);
     }
     echo '<br />';
+}
+if (empty($found_db_driver)) {
+  $RCI->failures++;
 }
 
 ?>
@@ -199,7 +203,7 @@
         echo '<br />';
         continue;
     }
-    if ($status == $val) {
+    if (filter_var($status, FILTER_VALIDATE_BOOLEAN) == $val) {
         $RCI->pass($var);
     } else {
       $RCI->fail($var, "is '$status', should be '$val'");
@@ -223,7 +227,7 @@
         echo '<br />';
         continue;
     }
-    if ($status == $val) {
+    if (filter_var($status, FILTER_VALIDATE_BOOLEAN) == $val) {
         $RCI->pass($var);
     } else {
       $RCI->optfail($var, "is '$status', could be '$val'");

--
Gitblit v1.9.1