From b43300fbcf92008ac1adc87c4b03776a9a4fb4e8 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 21 Jun 2022 18:18:32 -0500 Subject: Use Rector to upgrade constructors. Modern PHP versions do not recognize methods with the same name as the class as being constructors. This commit upgrades the code so that constructors are named `__construct`. The upgrade was done automatically using Rector. --- src/php-gettext/gettext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/php-gettext/gettext.php') diff --git a/src/php-gettext/gettext.php b/src/php-gettext/gettext.php index a121f9c..5b3886e 100644 --- a/src/php-gettext/gettext.php +++ b/src/php-gettext/gettext.php @@ -98,7 +98,7 @@ class gettext_reader { * @param object Reader the StreamReader object * @param boolean enable_cache Enable or disable caching of strings (default on) */ - function gettext_reader($Reader, $enable_cache = true) { + function __construct($Reader, $enable_cache = true) { // If there isn't a StreamReader, turn on short circuit mode. if (! $Reader || isset($Reader->error) ) { $this->short_circuit = true; -- cgit v1.2.3