diff --git a/lib/db.php b/lib/db.php
index bfb8e4afbd0f89fede38118bd9694679a83a0a05..4d8e5a1a86807bde830591f37ae457b2b0aaa86b 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -187,7 +187,7 @@ class OC_DB {
 
 			// Prepare options array
 			$options = array(
-			  'portability' => MDB2_PORTABILITY_ALL & (!MDB2_PORTABILITY_FIX_CASE),
+			  'portability' => MDB2_PORTABILITY_ALL - MDB2_PORTABILITY_FIX_CASE,
 			  'log_line_break' => '<br>',
 			  'idxname_format' => '%s',
 			  'debug' => true,