File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4820,6 +4820,9 @@ PHP_METHOD(Redis, subscribe)
4820
4820
/* read the status of the execution of the command `subscribe` */
4821
4821
4822
4822
z_tab = redis_sock_read_multibulk_reply_zval (INTERNAL_FUNCTION_PARAM_PASSTHRU , redis_sock );
4823
+ if (z_tab == NULL ) {
4824
+ RETURN_FALSE ;
4825
+ }
4823
4826
4824
4827
if (zend_hash_index_find (Z_ARRVAL_P (z_tab ), 0 , (void * * )& tmp ) == SUCCESS ) {
4825
4828
type_response = Z_STRVAL_PP (tmp );
@@ -4865,7 +4868,7 @@ PHP_METHOD(Redis, subscribe)
4865
4868
zval * * type , * * channel , * * data ;
4866
4869
z_tab = redis_sock_read_multibulk_reply_zval (INTERNAL_FUNCTION_PARAM_PASSTHRU , redis_sock );
4867
4870
4868
- if (Z_TYPE_P (z_tab ) != IS_ARRAY ) {
4871
+ if (z_tab == NULL || Z_TYPE_P (z_tab ) != IS_ARRAY ) {
4869
4872
//ERROR
4870
4873
break ;
4871
4874
}
You can’t perform that action at this time.
0 commit comments