Skip to content

Instantly share code, notes, and snippets.

@nickvergessen
Created November 14, 2018 10:56
Show Gist options
  • Save nickvergessen/eca25df48059ee16419809cbb848a9ec to your computer and use it in GitHub Desktop.
Save nickvergessen/eca25df48059ee16419809cbb848a9ec to your computer and use it in GitHub Desktop.
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index ebbcdeb087..180b3430e8 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -1071,7 +1071,10 @@ class QueryBuilder implements IQueryBuilder {
*
* @return IParameter the placeholder name used.
*/
- public function createNamedParameter($value, $type = IQueryBuilder::PARAM_STR, $placeHolder = null) {
+ public function createNamedParameter($value, $type = self::PARAM_STR, $placeHolder = null) {
+ if ($placeHolder === null) {
+ return new Parameter($this->queryBuilder->createNamedParameter($value, $type, null));
+ }
return new Parameter($this->queryBuilder->createNamedParameter($value, $type, $placeHolder));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment