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

[NFR] kernel/memory.c optimizations #893

Merged
merged 3 commits into from Jul 22, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work around Mongo bug
  • Loading branch information
sjinks committed Jul 22, 2013
commit b6885e41ad6b201dc2b4287a3ac00d09e8885e1a
17 changes: 7 additions & 10 deletions ext/mvc/collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,17 +1410,14 @@ 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
Z_SET_ISREF_P(options);
Z_ADDREF_P(options);
phalcon_call_method_p2(status, collection, "save", data, options);
#endif
if (Z_REFCOUNT_P(options) > 1) {
Z_UNSET_ISREF_P(options);
Z_DELREF_P(options);
}

if (Z_TYPE_P(status) == IS_ARRAY) {
if (phalcon_array_isset_string(status, SS("ok"))) {

Expand Down