- // Ignore digit strings and ints so INCR/DECR work
- return ( is_int( $data ) || ctype_digit( $data ) ) ? $data : serialize( $data );
+ // Serialize anything but integers so INCR/DECR work
+ // Do not store integer-like strings as integers to avoid type confusion (bug 60563)
+ return is_int( $data ) ? $data : serialize( $data );