File: php7-constructors.patch

package info (click to toggle)
php-net-imap 1%3A1.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 560 kB
  • ctags: 1,565
  • sloc: php: 3,982; xml: 420; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Support php7-style constructors
 Constructors with the same name as the class are deprecated in php7.
 Update to the new style __construct() for compatibility.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Index: php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAP.php
===================================================================
--- php-net-imap-1.1.3.orig/Net_IMAP-1.1.3/Net/IMAP.php
+++ php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAP.php
@@ -43,7 +43,7 @@
      * @param bool   $enableSTARTTLS Enable STARTTLS support
      * @param string $encoding       Character encoding
      */
-    function Net_IMAP($host = 'localhost',
+    function __construct($host = 'localhost',
                       $port = 143, 
                       $enableSTARTTLS = true,
                       $encoding = 'ISO-8859-1')
Index: php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAPProtocol.php
===================================================================
--- php-net-imap-1.1.3.orig/Net_IMAP-1.1.3/Net/IMAPProtocol.php
+++ php-net-imap-1.1.3/Net_IMAP-1.1.3/Net/IMAPProtocol.php
@@ -165,7 +165,7 @@
      *
      * @since  1.0
      */
-    function Net_IMAPProtocol()
+    function __construct()
     {
         $this->_socket = new Net_Socket();