Zend\Cache\Pattern\CallbackCache doesn't work with NULL #4629

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

https://github.com/zendframework/zf2/blob/master/library/Zend/Cache/Pattern/CallbackCache.php#L51

if (!isset($result[0])) {
throw new Exception\RuntimeException("Invalid cached data for key '{$key}'");
}

The cache has been saved and loaded correct but this condition returns false because isset returns false on NULL - should be replaced by array_key_exists

;)

@weierophinney weierophinney [#4629] Allow caching null values from callbacks
- Implemented test case for #4629
- Used fix suggested in original report
c397869
@mwillbanks mwillbanks added a commit that referenced this pull request Jun 12, 2013
@mwillbanks mwillbanks Merge branch 'hotfix/4629' into develop
Forward port #4629
44b73b0
@weierophinney weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#4629] Allow caching null values from cal…
…lbacks

- Implemented test case for zendframework/zendframework#4629
- Used fix suggested in original report
708dae0
@gianarb gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
@mwillbanks mwillbanks Merge branch 'hotfix/4629' e8ecd1e
@gianarb gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
@mwillbanks mwillbanks Merge branch 'hotfix/4629' into develop cb3093c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment