DDC-1091: Parser::FunctionsReturningStrings() doesn't check for custom DQL functions. #1686

doctrinebot opened this Issue Mar 31, 2011 · 3 comments

2 participants


Jira issue originally created by user iksela:

I defined a custom DQL FunctionNode that wasn't detected by the Parser.
Problem was in the Parser::FunctionsReturningStrings(), but I suspect the problem is more general.

Here's my (ugly) fix:

public function FunctionsReturningStrings()
$funcNameLower = strtolower($this->_lexer->lookahead['value']);
if (isset(self::$STRINGFUNCTIONS[$funcNameLower])) {
$funcClass = self::$STRINGFUNCTIONS[$funcNameLower];
$function = new $funcClass($funcNameLower);
else $function = $this->CustomFunctionsReturningStrings();

    return $function;

I include the custom DQL FunctionNode created.


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0.5 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment