From 524ee6fad0d5ca1f2cd3fd23035ddb7057ed1364 Mon Sep 17 00:00:00 2001 From: Flo Lech Date: Tue, 2 Aug 2022 15:20:22 +0200 Subject: [PATCH] Resolves depricated warning Updates array_key_exists to property_exists method to overcome deprication warning on PHP 8 --- src/I18n/Loader/Gettext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/I18n/Loader/Gettext.php b/src/I18n/Loader/Gettext.php index 00d5404..44373c3 100644 --- a/src/I18n/Loader/Gettext.php +++ b/src/I18n/Loader/Gettext.php @@ -144,7 +144,7 @@ public function load($locale, $filename) } // Read header entries - if (array_key_exists('', $textDomain)) { + if (property_exists($textDomain, '')) { // We really don't need this for our needs //$rawHeaders = explode("\n", trim($textDomain[''])); // @@ -194,4 +194,4 @@ protected function readIntegerList($num) return unpack('N' . $num, fread($this->file, 4 * $num)); } -} \ No newline at end of file +}