summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-03-18 09:25:22 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2015-03-18 09:25:22 +0100
commitc52bd10361be8ac834359022330b86a80d4f16ba (patch)
treea9abc3164c8ab480786ce75771c6dc9438057e29 /lib/public
parent8a95bf18b7f870541089ad51764baa8679579e4c (diff)
downloadnextcloud-server-c52bd10361be8ac834359022330b86a80d4f16ba.tar.gz
nextcloud-server-c52bd10361be8ac834359022330b86a80d4f16ba.zip
fix backwards compatibility for mapper execute method
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/appframework/db/mapper.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/public/appframework/db/mapper.php b/lib/public/appframework/db/mapper.php
index 5143547c8e8..266b7e6f2b2 100644
--- a/lib/public/appframework/db/mapper.php
+++ b/lib/public/appframework/db/mapper.php
@@ -26,7 +26,7 @@
namespace OCP\AppFramework\Db;
-use \OCP\IDBConnection;
+use OCP\IDBConnection;
/**
@@ -217,7 +217,16 @@ abstract class Mapper {
$index++;
}
- $query->execute();
+ $result = $query->execute();
+
+ // this is only for backwards compatibility reasons and can be removed
+ // in owncloud 10. IDb returns a StatementWrapper from execute, PDO,
+ // Doctrine and IDbConnection don't so this needs to be done in order
+ // to stay backwards compatible for the things that rely on the
+ // StatementWrapper being returned
+ if ($result instanceof \OC_DB_StatementWrapper) {
+ return $result;
+ }
return $query;
}