diff --git a/ext/tests/issue-1451.phpt b/ext/tests/issue-1451.phpt new file mode 100644 index 00000000000..52c2531fb1d --- /dev/null +++ b/ext/tests/issue-1451.phpt @@ -0,0 +1,17 @@ +--TEST-- +Memory corruption due to a bug in Phalcon\Cache\Backend\Memory::increment/decrement() - https://github.com/phalcon/cphalcon/issues/1451 +--SKIPIF-- + +--FILE-- +save('var', 1); +$cache->increment('var'); +echo $cache->get('var'), PHP_EOL; +$cache->decrement('var'); +echo $cache->get('var'), PHP_EOL; +?> +--EXPECT-- +2 +1