[minor] WP_REDIS_MAXTTL displays non-integer values in WP Admin
-
This is minor, but I noticed that
WP_REDIS_MAXTTL
allows setting of non-integer values. In the example below, I set it to a constant that is not yet defined and it rolled with it. This is probably purely cosmetic in WP Admin, since I see$max = (int) WP_REDIS_MAXTTL
inobject-cache.php
, but you may wish to changereturn defined( 'WP_REDIS_MAXTTL' ) ? WP_REDIS_MAXTTL : null;
toreturn defined( 'WP_REDIS_MAXTTL' ) ? intval( WP_REDIS_MAXTTL ) : null;
or similar…(also yes, I realize that this site is using an ancient version of PhpRedis – PHP 5.6, sadly, and I have no control over it)
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[minor] WP_REDIS_MAXTTL displays non-integer values in WP Admin’ is closed to new replies.