Skip to content

Commit

Permalink
Merge pull request #852 from sjinks/issue-851
Browse files Browse the repository at this point in the history
Best effort fix for Mongo's bugs
  • Loading branch information
Phalcon committed Jul 16, 2013
2 parents 85052c7 + f19e5a9 commit 335df6d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/mvc/collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,17 @@ PHP_METHOD(Phalcon_Mvc_Collection, save){
* Save the document
*/
PHALCON_INIT_NVAR(status);
#if PHP_VERSION_ID < 50400
{
zval *params[2] = { data, options };
zval func;
INIT_ZVAL(func);
ZVAL_STRING(&func, "save", 0);
call_user_function(EG(function_table), &collection, &func, status, 2, params TSRMLS_CC);
}
#else
phalcon_call_method_p2(status, collection, "save", data, options);
#endif
if (Z_TYPE_P(status) == IS_ARRAY) {
if (phalcon_array_isset_string(status, SS("ok"))) {

Expand Down

0 comments on commit 335df6d

Please sign in to comment.