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 in Phalcon 1.2.0 Phalcon\Mvc\Model\Criteria #866

Closed
makedo opened this issue Jul 17, 2013 · 2 comments
Closed

Bug in Phalcon 1.2.0 Phalcon\Mvc\Model\Criteria #866

makedo opened this issue Jul 17, 2013 · 2 comments

Comments

@makedo
Copy link

makedo commented Jul 17, 2013

Criteria::fromInput(
            $this->di, 
            'Translates', 
            $this->request->getQuery()
        );

That code will return an object of class Phalcon\Mvc\Model\Criteria.
I expexted that proprety _model will be 'Translates', but it is NULL.
This is the dump of this object:
object(Phalcon\Mvc\Model\Criteria)[92]
protected '_model' => null
protected '_params' => null
protected '_bindParams' => null
protected '_bindTypes' => null
protected '_hiddenParamNumber' => int 0

When I use method getModelName(), it also returns NULL.

@ghost
Copy link

ghost commented Jul 18, 2013

@phalcon

As far as I can see, _bindParams and _bindTypes are not used at all: _params['bind'] is used instead of _bindParams and _params['bindTypes'] is used instead of _bindTypes.

@phalcon
Copy link
Collaborator

phalcon commented Jul 18, 2013

Fixed in 1.2.1 by @sjinks, thanks!

@phalcon phalcon closed this as completed Jul 18, 2013
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