Ticket #31600: 31600-incr_decr_offset_type_check-2.diff
File 31600-incr_decr_offset_type_check-2.diff, 697 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/cache.php
467 467 if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) 468 468 $this->cache[ $group ][ $key ] = 0; 469 469 470 $offset = (int) $offset;470 $offset = is_numeric( $offset ) ? (int) $offset : 0; 471 471 472 472 $this->cache[ $group ][ $key ] -= $offset; 473 473 … … 583 583 if ( ! is_numeric( $this->cache[ $group ][ $key ] ) ) 584 584 $this->cache[ $group ][ $key ] = 0; 585 585 586 $offset = (int) $offset;586 $offset = is_numeric( $offset ) ? (int) $offset : 0 ; 587 587 588 588 $this->cache[ $group ][ $key ] += $offset;