summaryrefslogtreecommitdiffstats
path: root/Horde_Xml_Wbxml-php74.patch
blob: be359870f01afd9a72d1c8c0ba1f6bb9e94708fa (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/lib/Horde/Xml/Wbxml/Decoder.php b/lib/Horde/Xml/Wbxml/Decoder.php
index 2750a34..e1f71fe 100644
--- a/lib/Horde/Xml/Wbxml/Decoder.php
+++ b/lib/Horde/Xml/Wbxml/Decoder.php
@@ -89,7 +89,7 @@ class Horde_Xml_Wbxml_Decoder extends Horde_Xml_Wbxml_ContentHandler
      */
     public function getByte($input)
     {
-        return ord($input{$this->_strpos++});
+        return ord($input[$this->_strpos++]);
     }
 
     /**
diff --git a/lib/Horde/Xml/Wbxml/Encoder.php b/lib/Horde/Xml/Wbxml/Encoder.php
index 69b14cb..dbacb86 100644
--- a/lib/Horde/Xml/Wbxml/Encoder.php
+++ b/lib/Horde/Xml/Wbxml/Encoder.php
@@ -49,7 +49,7 @@ class Horde_Xml_Wbxml_Encoder extends Horde_Xml_Wbxml_ContentHandler
     /**
      * Constructor.
      */
-    public function Horde_Xml_Wbxml_Encoder()
+    public function __construct()
     {
         $this->_dtdManager = new Horde_Xml_Wbxml_DtdManager();
         $this->_stringTable = new Horde_Xml_Wbxml_HashTable();
@@ -213,7 +213,7 @@ class Horde_Xml_Wbxml_Encoder extends Horde_Xml_Wbxml_ContentHandler
 
         $bytes = array();
         for ($i = 0; $i < $nbytes; $i++) {
-            $bytes[] = $string{$i};
+            $bytes[] = $string[$i];
         }
 
         return $bytes;
@@ -422,7 +422,7 @@ class Horde_Xml_Wbxml_Encoder extends Horde_Xml_Wbxml_ContentHandler
             $this->_output .= chr(Horde_Xml_Wbxml::GLOBAL_TOKEN_SWITCH_PAGE);
             $this->_output .= chr($cp);
         } else {
-            $this->_subParser = new Horde_Xml_Wbxml_Encoder(true);
+            $this->_subParser = new Horde_Xml_Wbxml_Encoder();
             $this->_subParserStack = 1;
         }
     }