Skip to content

Commit

Permalink
Merge pull request #1488 from sjinks/issue-1485
Browse files Browse the repository at this point in the history
Fix #1485
  • Loading branch information
Phalcon committed Oct 30, 2013
2 parents 97417ca + abe148e commit 899da2a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ext/cache/backend/memcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ PHP_METHOD(Phalcon_Cache_Backend_Memcache, decrement){
PHP_METHOD(Phalcon_Cache_Backend_Memcache, flush){

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

Expand Down Expand Up @@ -618,13 +618,10 @@ PHP_METHOD(Phalcon_Cache_Backend_Memcache, 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 899da2a

Please sign in to comment.