Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1451 #1458

Merged
merged 2 commits into from Oct 28, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Test case for #1451
  • Loading branch information
sjinks committed Oct 27, 2013
commit e1a7f3b4e0615147b01468943ca43d96a8f3c867
17 changes: 17 additions & 0 deletions ext/tests/issue-1451.phpt
Original file line number Diff line number Diff line change
@@ -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--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$front = new \Phalcon\Cache\Frontend\None();
$cache = new \Phalcon\Cache\Backend\Memory($front);
$cache->save('var', 1);
$cache->increment('var');
echo $cache->get('var'), PHP_EOL;
$cache->decrement('var');
echo $cache->get('var'), PHP_EOL;
?>
--EXPECT--
2
1