Skip to content

Commit

Permalink
Merge pull request #1496 from sjinks/issue-1494
Browse files Browse the repository at this point in the history
Fix #1494
  • Loading branch information
Phalcon committed Nov 1, 2013
2 parents 412258c + 7ba405d commit b5b622a
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit b5b622a

Please sign in to comment.