Redis cache class in get method return false for keys with value of empty string #12437

Closed
sir-russell opened this Issue Nov 27, 2016 · 1 comment

Projects

None yet

2 participants

@sir-russell

Questions should go to https://forum.phalconphp.com
Documentation issues should go to https://github.com/phalcon/docs/issues

Expected and Actual Behavior

Describe what you are trying to achieve and what goes wrong.

Provide output if related. Provide coredump if any. Use https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace as reference

// paste output here

Provide minimal script to reproduce the issue

use \Phalcon\Cache\Backend\Redis;
$r = new Redis();
$r->get('shir'); // shir actually exists in redis with EMPTY string, but this return false

Details

  • Phalcon version: (php --ri phalcon)
    Web framework delivered as a C-extension for PHP
    phalcon => enabled
    Author => Phalcon Team and contributors
    Version => 2.0.13
    Build Date => May 20 2016 22:13:46
    Powered by Zephir => Version 0.9.2a-dev

Directive => Local Value => Master Value
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.events => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.orm.column_renaming => On => On
phalcon.orm.not_null_validations => On => On
phalcon.orm.exception_on_failed_save => Off => Off
phalcon.orm.enable_literals => On => On
phalcon.orm.late_state_binding => Off => Off
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.ignore_unknown_columns => Off => Off

  • PHP Version: (php -v)
    PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

  • Operating System: Ubuntu/14.04

  • Installation type: installing via package manager

  • Zephir version (if any):-

  • Server: Nginx

  • Other related info (Database, table schema):

@mbrostami mbrostami referenced this issue Nov 27, 2016
Closed

Cache\Backend\Redis::get method bugfix #12438

2 of 3 tasks complete
@sergeyklay sergeyklay added this to the 3.0.3 milestone Nov 27, 2016
@sergeyklay sergeyklay referenced this issue Nov 27, 2016
Merged

Fixed redis cache backend #12440

3 of 3 tasks complete
@sergeyklay
Collaborator

Fixed in the 3.0.x branch.

@sergeyklay sergeyklay closed this Nov 27, 2016
@sergeyklay sergeyklay self-assigned this Dec 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment