Bug #44049

runDql() method in Doctrine\Service handles constant incorrectly

Added by Adrian Föder over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-12-17
Priority:Must have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 2.0
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

The method looks like

1    public function runDql($dql, $hydrationMode = \Doctrine\ORM\Query::HYDRATE_OBJECT, $firstResult = NULL, $maxResult = NULL) {
2        ...
3
4        return $query->execute(array(), constant($hydrationMode));
5    }

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.

Associated revisions

Revision a3f587b1
Added by Adrian Föder over 2 years ago

[BUGFIX] Handle constant correctly in Doctrine\Service

The runDql() method in Persistence\Doctrine\Service didn't
use the passed by value for the hydrationMode correctly.

Now that value is considered to be an already resolved constant
as annotated and noted down in the method's signature.

Change-Id: Ief1ce841254fa9913bb08f1926ee451a27fe0733
Fixes: #44049
Releases: master, 2.0

Revision 70cb604b
Added by Adrian Föder over 2 years ago

[BUGFIX] Handle constant correctly in Doctrine\Service

The runDql() method in Persistence\Doctrine\Service didn't
use the passed by value for the hydrationMode correctly.

Now that value is considered to be an already resolved constant
as annotated and noted down in the method's signature.

Change-Id: Ief1ce841254fa9913bb08f1926ee451a27fe0733
Fixes: #44049
Releases: master, 2.0

History

#1 Updated by Karsten Dambekalns over 2 years ago

  • Target version set to 2.0

#2 Updated by Adrian Föder over 2 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 over 2 years ago

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

Also available in: Atom PDF