Skip to content

Commit 8a4a749

Browse files
committed
Fix incr/decr result
1 parent fd783a4 commit 8a4a749

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

includes/object-cache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,7 @@ public function increment( $key, $offset = 1, $group = 'default' ) {
24162416

24172417
if ( $result ) {
24182418
$this->add_to_internal_cache( $derived_key, $value );
2419+
$result = $value;
24192420
}
24202421
} catch ( Exception $exception ) {
24212422
$this->handle_exception( $exception );
@@ -2477,6 +2478,7 @@ public function decrement( $key, $offset = 1, $group = 'default' ) {
24772478

24782479
if ( $result ) {
24792480
$this->add_to_internal_cache( $derived_key, $value );
2481+
$result = $value;
24802482
}
24812483
} catch ( Exception $exception ) {
24822484
$this->handle_exception( $exception );

0 commit comments

Comments
 (0)