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

Fix #1494 #1496

Merged
merged 1 commit into from Nov 1, 2013
Merged
Changes from all commits
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
Fix #1494
  • Loading branch information
sjinks committed Oct 31, 2013
commit 7ba405d44c603347541ba2a3378f6a74983a6151
9 changes: 3 additions & 6 deletions ext/cache/backend/libmemcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ PHP_METHOD(Phalcon_Cache_Backend_Libmemcached, exists){
PHP_METHOD(Phalcon_Cache_Backend_Libmemcached, flush){

zval *memcache, *options, *special_key;
zval *keys, *real_key = NULL;
zval *keys;
HashPosition pos;
zval **value;

Expand Down Expand Up @@ -647,13 +647,10 @@ PHP_METHOD(Phalcon_Cache_Backend_Libmemcached, flush){
) {
zval key = phalcon_get_current_key_w(Z_ARRVAL_P(keys), &pos);

PHALCON_INIT_NVAR(real_key);
ZVAL_STRINGL(real_key, Z_STRVAL(key), Z_STRLEN(key), 1);

phalcon_array_unset(&keys, real_key, 0);
phalcon_call_method_p1_noret(memcache, "delete", real_key);
phalcon_call_method_p1_noret(memcache, "delete", &key);
}

zend_hash_clean(Z_ARRVAL_P(keys));
phalcon_call_method_p2_noret(memcache, "set", special_key, keys);
}

Expand Down