From 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 10 Jan 2025 08:13:09 +0100 Subject: Reduce undeeded use of elvis operator ?: (#7204) --- cli/i18n/I18nFile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/i18n/I18nFile.php b/cli/i18n/I18nFile.php index 6771dfbff..48b9710bf 100644 --- a/cli/i18n/I18nFile.php +++ b/cli/i18n/I18nFile.php @@ -65,7 +65,10 @@ class I18nFile { * @return array> */ private function process(string $filename): array { - $fileContent = file_get_contents($filename) ?: []; + $fileContent = file_get_contents($filename); + if (!is_string($fileContent)) { + return []; + } $content = str_replace('