Bug #44049

runDql() method in Doctrine\Service handles constant incorrectly

Added by Adrian Föder almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Persistence
Start date:
2012-12-17
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

The method looks like

    public function runDql($dql, $hydrationMode = \Doctrine\ORM\Query::HYDRATE_OBJECT, $firstResult = NULL, $maxResult = NULL) {
        ...

        return $query->execute(array(), constant($hydrationMode));
    }

Since $hydrationMode is obviously intended to be a constant, hence an integer, the invokation of constant($hydrationMode) results appopriately in Warning: constant(): Couldn't find constant 2

This never seems to happen in usual context because it's passed as a string in the Command.

#1

Updated by Karsten Dambekalns almost 9 years ago

  • Target version set to 2.0
#2

Updated by Adrian Föder almost 9 years ago

  • Status changed from Accepted to Under Review

Review is located here: https://review.typo3.org/#/c/17188/

#3

Updated by Adrian Föder almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF