diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 6c2ef71098b79b14ce5d93888bf75a8452b5963b..5b2fcfaadf950df8d30a3eca91bfd9e77602353d 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -96,7 +96,7 @@ class Cache {
 	 * get the stored metadata of a file or folder
 	 *
 	 * @param string/int $file
-	 * @return array
+	 * @return array | false
 	 */
 	public function get($file) {
 		if (is_string($file) or $file == '') {
@@ -115,6 +115,12 @@ class Cache {
 		$result = $query->execute($params);
 		$data = $result->fetchRow();
 
+		//FIXME hide this HACK in the next database layer, or just use doctrine and get rid of MDB2 and PDO
+		//PDO returns false, MDB2 returns null, oracle always uses MDB2, so convert null to false
+		if ($data === null) {
+			$data = false;
+		}
+
 		//merge partial data
 		if (!$data and  is_string($file)) {
 			if (isset($this->partial[$file])) {
diff --git a/tests/lib/db.php b/tests/lib/db.php
index 3c38acb558b16f6939d584ef3846f3e855dcf606..afbdb413c3d7e61e64adcad3b7a2588d8cf98c6a 100644
--- a/tests/lib/db.php
+++ b/tests/lib/db.php
@@ -37,7 +37,7 @@ class Test_DB extends PHPUnit_Framework_TestCase {
 		$result = $query->execute(array('uri_1'));
 		$this->assertTrue((bool)$result);
 		$row = $result->fetchRow();
-		$this->assertFalse($row);
+		$this->assertFalse((bool)$row); //PDO returns false, MDB2 returns null
 		$query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (?,?)');
 		$result = $query->execute(array('fullname test', 'uri_1'));
 		$this->assertTrue((bool)$result);
@@ -48,7 +48,7 @@ class Test_DB extends PHPUnit_Framework_TestCase {
 		$this->assertArrayHasKey('fullname', $row);
 		$this->assertEquals($row['fullname'], 'fullname test');
 		$row = $result->fetchRow();
-		$this->assertFalse($row);
+		$this->assertFalse((bool)$row); //PDO returns false, MDB2 returns null
 	}
 
 	/**