(bug 37352) Boolean issue when using sqlite.
[lhc/web/wiklou.git] / includes / db / ORMRow.php
index 6acc124..dc8649b 100644 (file)
@@ -509,11 +509,7 @@ class ORMRow implements IORMRow {
                                        $value = (float)$value;
                                        break;
                                case 'bool':
-                                       if ( is_string( $value ) ) {
-                                               $value = $value !== '0';
-                                       } elseif ( is_int( $value ) ) {
-                                               $value = $value !== 0;
-                                       }
+                                       $value = (bool)$value;
                                        break;
                                case 'array':
                                        if ( is_string( $value ) ) {