File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ inline static int igbinary_serialize_data_init(struct igbinary_serialize_data *i
454
454
hash_si_init (& igsd -> objects , 16 );
455
455
}
456
456
457
- igsd -> compact_strings = ( bool ) IGBINARY_G ( compact_strings );
457
+ igsd -> compact_strings = 1 ; // PHPHREDIS WARNING: DO NOT CHANGE.
458
458
459
459
return r ;
460
460
}
Original file line number Diff line number Diff line change @@ -2810,6 +2810,13 @@ private function checkSerializer($mode) {
2810
2810
$ this ->assertTrue ($ data ['data ' ] === 'test 1 ' );
2811
2811
$ this ->assertTrue ($ data ['session_id ' ] === 'test 2 ' );
2812
2812
2813
+ // issue #145, serializer with objects.
2814
+ $ this ->redis ->set ('x ' , array (new stdClass , new stdClass ));
2815
+ $ x = $ this ->redis ->get ('x ' );
2816
+ $ this ->assertTrue (is_array ($ x ));
2817
+ $ this ->assertTrue (is_object ($ x [0 ]) && get_class ($ x [0 ]) === 'stdClass ' );
2818
+ $ this ->assertTrue (is_object ($ x [1 ]) && get_class ($ x [1 ]) === 'stdClass ' );
2819
+
2813
2820
// revert
2814
2821
$ this ->assertTrue ($ this ->redis ->setOption (Redis::OPT_SERIALIZER , Redis::SERIALIZER_NONE ) === TRUE ); // set ok
2815
2822
$ this ->assertTrue ($ this ->redis ->getOption (Redis::OPT_SERIALIZER ) === Redis::SERIALIZER_NONE ); // get ok
You can’t perform that action at this time.
0 commit comments