diff options
Diffstat (limited to 'app/Controllers/updateController.php')
| -rw-r--r-- | app/Controllers/updateController.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index e5bf276cd..c7623d0a4 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -89,7 +89,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { chdir($cwd); $line = implode('; ', $output); return $line == '' || - strpos($line, '[behind') !== false || strpos($line, '[ahead') !== false || strpos($line, '[gone') !== false; + str_contains($line, '[behind') || str_contains($line, '[ahead') || str_contains($line, '[gone'); } /** @return string|true */ @@ -169,8 +169,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { } private function is_release_channel_stable(string $currentVersion): bool { - return strpos($currentVersion, 'dev') === false && - strpos($currentVersion, 'edge') === false; + return !str_contains($currentVersion, 'dev') && !str_contains($currentVersion, 'edge'); } /* Check installation if there is a newer version. @@ -239,7 +238,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController { $res_array = explode("\n", (string)$result, 2); $status = $res_array[0]; - if (strpos($status, 'UPDATE') !== 0) { + if (!str_starts_with($status, 'UPDATE')) { $this->view->message = [ 'status' => 'latest', 'body' => _t('feedback.update.none'), |
