Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Transaction Manager is "eventsManager" #2386

Closed
scento opened this issue Apr 26, 2014 · 0 comments
Closed

[BUG] Transaction Manager is "eventsManager" #2386

scento opened this issue Apr 26, 2014 · 0 comments

Comments

@scento
Copy link

scento commented Apr 26, 2014

Problem
When using the Phalcon\DI\FactoryDefault\CLI class to generate a new Dependency Injector, the Service of TransactionManager returns the name eventsManager, since the lines

PHALCON_INIT_NVAR(name);
ZVAL_STRING(name, "eventsManager", 1);

are not overwritten by a new "name".

Solution
Add the following lines before creating a new Service for the transactionManager:

PHALCON_INIT_NVAR(name);
ZVAL_STRING(name, "transactionManager", 1);

Testcase

<?php
$di = new \Phalcon\DI\FactoryDefault\CLI();
echo $di->getService('transactionManager')->getName();
?>
@scento scento changed the title [BUG] Transaction Manager has "eventsManager" name [BUG] Transaction Manager is "eventsManager" Apr 26, 2014
@dreamsxin dreamsxin mentioned this issue Apr 28, 2014
phalcon pushed a commit that referenced this issue Apr 28, 2014
@scento scento closed this as completed Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant