diff options
Diffstat (limited to 'php-php-gettext-1.0.11-php7.patch')
-rw-r--r-- | php-php-gettext-1.0.11-php7.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/php-php-gettext-1.0.11-php7.patch b/php-php-gettext-1.0.11-php7.patch new file mode 100644 index 0000000..f3b9eed --- /dev/null +++ b/php-php-gettext-1.0.11-php7.patch @@ -0,0 +1,48 @@ +Patch by Marc Delisle <marc@infomarc.info> for php-gettext >= 1.0.11, which adds +PHP 7 compatibility, see also http://php.net/manual/en/language.oop5.decon.php for +details: For backwards compatibility, if PHP 5 cannot find a __construct() function +for a given class, and the class did not inherit one from a parent class, it will +search for the old-style constructor function, by the name of the class. + +Without this patch, https://github.com/phpmyadmin/phpmyadmin/issues/11462 happens. + +--- php-gettext-1.0.11/gettext.php 2010-12-25 00:15:19.000000000 +0100 ++++ php-gettext-1.0.11/gettext.php.php7 2015-09-04 21:45:09.000000000 +0200 +@@ -98,7 +98,7 @@ + * @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) { ++ public 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; +--- php-gettext-1.0.11/streams.php 2010-02-15 12:05:57.000000000 +0100 ++++ php-gettext-1.0.11/streams.php.php7 2015-09-04 21:45:09.000000000 +0200 +@@ -49,7 +49,7 @@ + var $_pos; + var $_str; + +- function StringReader($str='') { ++ public function __construct($str='') { + $this->_str = $str; + $this->_pos = 0; + } +@@ -86,7 +86,7 @@ + var $_fd; + var $_length; + +- function FileReader($filename) { ++ public function __construct($filename) { + if (file_exists($filename)) { + + $this->_length=filesize($filename); +@@ -143,7 +143,7 @@ + // Preloads entire file in memory first, then creates a StringReader + // over it (it assumes knowledge of StringReader internals) + class CachedFileReader extends StringReader { +- function CachedFileReader($filename) { ++ public function __construct($filename) { + if (file_exists($filename)) { + + $length=filesize($filename); |