HomePhabricator

Fix CacheTime::getCacheExpiry for php8
92e9231922cfUnpublished

Tags
None
Referenced Files
None
Subscribers
None

Unpublished Commit · Learn More

  • Publishing Disabled: All publishing is disabled for this repository.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Fix CacheTime::getCacheExpiry for php8

CacheTime::mCacheTime can contain the empty string,
which makes it fail on php8

PHP 8 changes the handling for string and int comparison.
These non-numeric strings are no longer silently converted to int 0,
which previously allowed for the comparison to become false without
actually checking against non-integer values.
https://wiki.php.net/rfc/saner-numeric-strings

Bug: T248925
Change-Id: Idecd3a5cd41fc2d54968db4b02787fe2a81af9d2
(cherry picked from commit 76126158cbb61aa41d381ce7715224731a76e7a8)

Details

Event Timeline