From c282ea691828c9f7f76945c5bc8a0f5f87eaf51f Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Sat, 26 Feb 2022 23:14:57 +0000 Subject: [PATCH] Fix 100% CPU and timeout on some servers --- CRM/Core/I18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index f6ed3dcf03..22107add28 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -561,7 +561,7 @@ class CRM_Core_I18n { // phpgettext $mo_file = $path . DIRECTORY_SEPARATOR . 'l10n' . DIRECTORY_SEPARATOR . $this->locale . DIRECTORY_SEPARATOR . 'LC_MESSAGES' . DIRECTORY_SEPARATOR . $domain . '.mo'; $streamer = new FileReader($mo_file); - $this->_extensioncache[$key] = new gettext_reader($streamer); + $this->_extensioncache[$key] = $streamer->length() ? new gettext_reader($streamer) : NULL; } } catch (CRM_Extension_Exception $e) { -- 2.25.1