Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit d8c2145

Browse files
committed
Bye bye PHP6
1 parent ec3df7a commit d8c2145

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

library/Zend/Serializer/Adapter/PythonPickle.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt
9999
const OP_BINBYTES = 'B'; // push bytes; counted binary string argument
100100
const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes
101101

102-
/**
103-
* @var bool Whether or not this is a PHP 6 binary
104-
*/
105-
protected static $_isPhp6 = null;
106-
107102
/**
108103
* @var bool Whether or not the system is little-endian
109104
*/
@@ -155,9 +150,6 @@ public function __construct($opts=array())
155150
if (self::$_isLittleEndian === null) {
156151
self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00");
157152
}
158-
if (self::$_isPhp6 === null) {
159-
self::$_isPhp6 = !version_compare(PHP_VERSION, '6.0.0', '<');
160-
}
161153

162154
$this->_marker = new stdClass();
163155
}
@@ -1103,10 +1095,6 @@ protected function _loadUnicode()
11031095
$pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX
11041096
$data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data);
11051097

1106-
if (self::$_isPhp6) {
1107-
$data = unicode_decode($data, 'UTF-8');
1108-
}
1109-
11101098
$this->_stack[] = $data;
11111099
}
11121100

@@ -1172,10 +1160,6 @@ protected function _loadBinUnicode()
11721160
list(, $n) = unpack('l', $n);
11731161
$data = $this->_read($n);
11741162

1175-
if (self::$_isPhp6) {
1176-
$data = unicode_decode($data, 'UTF-8');
1177-
}
1178-
11791163
$this->_stack[] = $data;
11801164
}
11811165

0 commit comments

Comments
 (0)