File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ for ($i = 4; $i <= 256; $i += 4) {
41
41
42
42
// Incorrect length
43
43
test_z85_encode ('1234567 ' , null );
44
- test_z85_encode (null , null );
44
+ test_z85_encode ('' , null );
45
45
46
46
test_z85_decode ('1234567 ' , null );
47
- test_z85_decode (null , null );
47
+ test_z85_decode ('' , null );
48
48
49
49
echo "OK " ;
50
50
51
51
--EXPECT --
52
- OK
52
+ OK
Original file line number Diff line number Diff line change @@ -169,10 +169,15 @@ static
169
169
zend_string * s_create_key (zval * entry )
170
170
{
171
171
if (Z_TYPE_P (entry ) == IS_RESOURCE ) {
172
- return strpprintf (0 , "r:%d" , Z_RES_P (entry )-> handle );
172
+ /* zend_long since 8.1.0 */
173
+ return strpprintf (0 , "r:%ld" , (long )Z_RES_P (entry )-> handle );
173
174
}
174
175
else {
176
+ #if PHP_VERSION_ID >= 80100
177
+ zend_string * hash = php_spl_object_hash (Z_OBJ_P (entry ));
178
+ #else
175
179
zend_string * hash = php_spl_object_hash (entry );
180
+ #endif
176
181
zend_string * key = strpprintf (0 , "o:%s" , hash -> val );
177
182
zend_string_release (hash );
178
183
return key ;
You can’t perform that action at this time.
0 commit comments