aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-05-10 23:17:25 +0200
committerGravatar GitHub <noreply@github.com> 2025-05-10 23:17:25 +0200
commit532d229d3396817f702c1ecae79fb7f9bdad9a64 (patch)
tree1326136f63fcaf0c7ebd0007e4bdf889183187ba /lib/lib_rss.php
parent84d4aeb9e613a70b53d87c62d07bb4c4635290c3 (diff)
Fix newest articles not shown (#7577)
* Fix newest articles not shown Case when processing was faster than 1 second. fix https://github.com/FreshRSS/FreshRSS/issues/7412 Regression from https://github.com/FreshRSS/FreshRSS/pull/7149 * Simplify uTimeString() PHPStan has become a bit smarter
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 3ddda1515..682b1365d 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -647,11 +647,9 @@ function lazyimg(string $content): string {
/** @return numeric-string */
function uTimeString(): string {
- $t = @gettimeofday();
- $sec = is_numeric($t['sec']) ? (int)$t['sec'] : 0;
- $usec = is_numeric($t['usec']) ? (int)$t['usec'] : 0;
- $result = ((string)$sec) . str_pad((string)$usec, 6, '0', STR_PAD_LEFT);
- return ctype_digit($result) ? $result : '0';
+ $t = gettimeofday();
+ // @phpstan-ignore return.type
+ return ((string)$t['sec']) . str_pad((string)$t['usec'], 6, '0', STR_PAD_LEFT);
}
function invalidateHttpCache(string $username = ''): bool {