aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 6bceccc86..ae8744841 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -41,8 +41,7 @@ if (!function_exists('syslog')) {
define('STDERR', fopen('php://stderr', 'w'));
}
function syslog(int $priority, string $message): bool {
- // @phpstan-ignore booleanAnd.rightAlwaysTrue
- if (COPY_SYSLOG_TO_STDERR && defined('STDERR') && STDERR) {
+ if (COPY_SYSLOG_TO_STDERR && defined('STDERR') && is_resource(STDERR)) {
return fwrite(STDERR, $message . "\n") != false;
}
return false;
@@ -619,9 +618,12 @@ function lazyimg(string $content): string {
) ?? '';
}
+/** @return numeric-string */
function uTimeString(): string {
$t = @gettimeofday();
- return $t['sec'] . str_pad('' . $t['usec'], 6, '0', STR_PAD_LEFT);
+ $result = $t['sec'] . str_pad('' . $t['usec'], 6, '0', STR_PAD_LEFT);
+ /** @var numeric-string @result */
+ return $result;
}
function invalidateHttpCache(string $username = ''): bool {