-
Notifications
You must be signed in to change notification settings - Fork 75
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
strange beforeFind error #126
Comments
That is quite strange I am working on the latest now on the test repo. What file is this in and the line? Unless it is your own code? |
EMongoDocument line 439 |
Holy crap I didn't see that sneak its way into there, I should find out who did that. I can see why that code might be showing its ugly face, there was a change recently that actually made beforeFind() work. I will get rid of that code. |
ff0f4a3 gone, checked this in CActiveRecord, it wasn't there so had no idea why it is there now. |
Thanks |
As a side note: |
Ahh, hmm I should look into exactly how that code got there when I have a moment but it seems weird and I definitely never put it there :S |
ok, still working with 1.1.12, I should upgrade... |
Regarding to git blame, it was rathil and you added a comment: git blame -L435,+20 581ead3 -- EMongoDocument.php :) 0f9c8ac5 protected/extensions/MongoYii/EMongoDocument.php (Sammaye 2013-01-31 13:16:33 +0000 438) // for backward compatibility
3b94beaa EMongoDocument.php (rathil 2013-08-29 15:51:39 +0300 439) $event->criteria = func_num_args() > 0 ? func_get_arg(0) : null; |
Which commit? That one sends to args in trace function which I reverted and my Eclipse shows the line all the way in history |
I see it even here, wya before Rathil: https://github.com/Sammaye/MongoYii/blob/4e9c791d1b6a940a97d37fb7d4d73a0e7f80422e/EMongoDocument.php |
I actualy see this at the beginning: https://github.com/Sammaye/MongoYii/blob/28235ce9ebcb4371247053354f66cb4d76e181b6/protected/extensions/MongoYii/EMongoDocument.php I think this is some code I must have got from some place |
Ok, maybe rathil just did some formatting. The mentioned commit did a lot of formatting, so I guess, thats why I missinterpreted git blame. |
I checked out the current code.
Now I get the error 'CModelEvent.criteria' is not defined in EMongoDocument::beforeFind
$event = new CModelEvent($this);
$event->criteria = func_num_args() > 0 ? func_get_arg(0) : null;
This is right, because CModelEvent has no criteria property (or setCriteria() method).
But this line was in my last working code too, before updating ... strange.
The text was updated successfully, but these errors were encountered: