Jira issue originally created by user @hobodave:
I'm not aware of a platform that requires all 3 arguments to SUBSTRING().
This seems to only affect queries from the QueryBuilder
The following DQL works fine:
UPDATE Common\Model\Location e SET e.path = CONCAT('00010002', SUBSTRING(e.path, 9)) WHERE e.path LIKE '00010001%'
Yet the following QueryBuilder expression:
$substr = $expr->substring('e.' . $this->getPathFieldName(), strlen($oldPath)+1);
Missing argument 3 for Doctrine\ORM\Query\Expr::substring()
If I make that argument optional, default null I get the following generated DQL and error:
"UPDATE Common\Model\Location e SET e.path = CONCAT('00010002', SUBSTRING(e.path, 9, )) WHERE e.path LIKE '00010001%'
Doctrine\ORM\Query\QueryException: [Syntax Error] line 0, col 84: Error: Expected Literal, got ')'
Comment created by @hobodave:
Fixed in http://github.com/doctrine/doctrine2/commit/ece0e3ad881fae4b0cb434aaa6257cdc5da6f5fc
Issue was closed with resolution "Fixed"