aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-10 08:13:09 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-10 08:13:09 +0100
commit5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch)
treedecb975aa750660cea965bf61399df2335493b9d /cli
parent3280ec617f8081bf0d5349e441ae564a42fdc500 (diff)
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'cli')
-rw-r--r--cli/i18n/I18nFile.php5
1 files changed, 4 insertions, 1 deletions
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<string,string|array<string,mixed>>
*/
private function process(string $filename): array {
- $fileContent = file_get_contents($filename) ?: [];
+ $fileContent = file_get_contents($filename);
+ if (!is_string($fileContent)) {
+ return [];
+ }
$content = str_replace('<?php', '', $fileContent);
$content = preg_replace([