summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/db.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php
index 951c21f4146..3aff9cc68ae 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -703,11 +703,11 @@ class DoctrineStatementWrapper {
}
private function tryFixSubstringLastArgumentDataForMSSQL($input) {
- $query = $this->statement->queryString;
+ $query = $this->statement->getWrappedStatement()->queryString;
$pos = stripos ($query, 'SUBSTRING');
if ( $pos === false) {
- return;
+ return $input;
}
try {