Closed
Description
Expected and Actual Behavior
When saving numerical values with Phalcon\Cache\Frontend\Data and Phalcon\Cache\Backend\Apc, values are not serialized on save but Phalcon tries to deserialize them on get.
$frontend = new \Phalcon\Cache\Frontend\Data(['lifetime' => 24 * 3600]);
$cache = new \Phalcon\Cache\Backend\Apc(
$frontend,
['prefix' => $di->get('store')->getStoreName()]
);
$cache->save('test-key', 1);
$cache->get('test-key');
throws the following exception:
Shared\Error\PhpErrorException: [Notice] unserialize(): Error at offset 0 of 1 bytes
I believe the issue is related to 4e3989a.
The beforeStore method is now bypassed in the Frontend for numerical values, however the afterRetrieve method is not being bypassed for numerical values.
Details
- Phalcon version: 3.0.1
- PHP Version: 5.6.27
- Operating System: Ubuntu 14.04.5 LTS
- Installation type: installing via package manager
- Server: Nginx
Metadata
Assignees
Labels
No labels