Skip to content

Commit

Permalink
Fix php 7.2 error
Browse files Browse the repository at this point in the history
  • Loading branch information
richardDobron committed Apr 19, 2023
1 parent 50f09a7 commit ece129e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/fbt/Runtime/Shared/FbtHooks.php
Expand Up @@ -156,9 +156,13 @@ public static function storePhrases()

if (file_exists($file)) {
self::$sourceStrings = json_decode(file_get_contents($file), true);
$phrases = array_merge(...array_column(self::$sourceStrings['phrases'] ?? [], 'hashToText'));
foreach (array_keys($phrases) as $hash) {
self::$storedHashes[$hash] = true;
$phrases = self::$sourceStrings['phrases'] ?? [];

if ($phrases) {
$hashToText = array_merge(...array_column($phrases, 'hashToText'));
foreach (array_keys($hashToText) as $hash) {
self::$storedHashes[$hash] = true;
}
}
}

Expand Down

0 comments on commit ece129e

Please sign in to comment.