[pkg-php-pear] Bug#830699: Deprecated constructor warnings with PHP 7
Richard Laager
rlaager at wiktel.com
Tue Sep 6 07:40:05 UTC 2016
Attached is a patch to fix this. It's versioned from and tested on
Yakkety, but it should work just the same on Debian.
--
Richard
-------------- next part --------------
diff -Nru php-gettext-1.0.11/debian/changelog php-gettext-1.0.11/debian/changelog
--- php-gettext-1.0.11/debian/changelog 2016-05-21 19:27:13.000000000 -0500
+++ php-gettext-1.0.11/debian/changelog 2016-09-06 02:32:33.000000000 -0500
@@ -1,3 +1,10 @@
+php-gettext (1.0.11-3ubuntu1) yakkety; urgency=medium
+
+ * Fix deprecated constructors to avoid warnings (LP: #1522900)
+ (Closes: 830699)
+
+ -- Richard Laager <rlaager at wiktel.com> Tue, 06 Sep 2016 02:32:03 -0500
+
php-gettext (1.0.11-3) unstable; urgency=medium
* Fixed debian/compat with debhelper 9
diff -Nru php-gettext-1.0.11/debian/patches/fix-constructors.patch php-gettext-1.0.11/debian/patches/fix-constructors.patch
--- php-gettext-1.0.11/debian/patches/fix-constructors.patch 1969-12-31 18:00:00.000000000 -0600
+++ php-gettext-1.0.11/debian/patches/fix-constructors.patch 2016-09-06 02:31:51.000000000 -0500
@@ -0,0 +1,50 @@
+Author: dregad on Launchpad
+Description: Fix deprecated constructors
+Forwarded: no
+Bug-Ubuntu: https://bugs.launchpad.net/php-gettext/+bug/1522900
+Bug-Debian: http://bugs.debian.org/830699
+
+=== modified file 'gettext.php'
+--- old/gettext.php 2015-11-11 16:53:37 +0000
++++ new/gettext.php 2016-08-26 22:03:16 +0000
+@@ -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) {
++ 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;
+
+=== modified file 'streams.php'
+--- old/streams.php 2010-02-15 11:01:10 +0000
++++ new/streams.php 2016-08-26 22:02:58 +0000
+@@ -49,7 +49,7 @@
+ var $_pos;
+ var $_str;
+
+- function StringReader($str='') {
++ function __construct($str='') {
+ $this->_str = $str;
+ $this->_pos = 0;
+ }
+@@ -86,7 +86,7 @@
+ var $_fd;
+ var $_length;
+
+- function FileReader($filename) {
++ 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) {
++ function __construct($filename) {
+ if (file_exists($filename)) {
+
+ $length=filesize($filename);
+
diff -Nru php-gettext-1.0.11/debian/patches/series php-gettext-1.0.11/debian/patches/series
--- php-gettext-1.0.11/debian/patches/series 2016-05-21 12:37:40.000000000 -0500
+++ php-gettext-1.0.11/debian/patches/series 2016-09-06 02:31:51.000000000 -0500
@@ -1 +1,2 @@
ignore_the_test_results.patch
+fix-constructors.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20160906/cc843495/attachment.sig>
More information about the pkg-php-pear
mailing list