diff options
| author | 2025-01-10 08:13:09 +0100 | |
|---|---|---|
| committer | 2025-01-10 08:13:09 +0100 | |
| commit | 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch) | |
| tree | decb975aa750660cea965bf61399df2335493b9d /cli/i18n | |
| parent | 3280ec617f8081bf0d5349e441ae564a42fdc500 (diff) | |
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'cli/i18n')
| -rw-r--r-- | cli/i18n/I18nFile.php | 5 |
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([ |
