调整部分CacheDriver::dec在为空的时候递减的行为

This commit is contained in:
Gaozhen Ying
2017-09-19 21:00:43 +08:00
committed by ThinkPHP
parent 8aeb20dcd4
commit 1b8d64169f
3 changed files with 3 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ class Sqlite extends Driver
if ($this->has($name)) {
$value = $this->get($name) - $step;
} else {
$value = $step;
$value = -$step;
}
return $this->set($name, $value, 0) ? $value : false;
}