@@ -1914,67 +1914,6 @@ PHP_REDIS_API int redis_sock_read_multibulk_reply(INTERNAL_FUNCTION_PARAMETERS,
19141914 return 0 ;
19151915}
19161916
1917- /**
1918- * redis_sock_read_multibulk_reply_vals
1919- *
1920- * This is identical to redis_sock_read_multibulk_reply except that it unserializes vals only, rather than rely on
1921- * the chosen unserializer to silently return 0 after a failed attempt (which msgpack does not do).
1922- *
1923- * Perhaps not the optimal solution, but the easiest way to resolve the problem of failed attempts to
1924- * unserialize a key that hadn't been serialized to begin with in blpop, brpop.
1925- *
1926- */
1927- PHP_REDIS_API int redis_sock_read_multibulk_reply_vals (INTERNAL_FUNCTION_PARAMETERS ,
1928- RedisSock * redis_sock , zval * z_tab ,
1929- void * ctx )
1930- {
1931- char inbuf [1024 ];
1932- int numElems , err_len ;
1933-
1934- if (-1 == redis_check_eof (redis_sock , 0 TSRMLS_CC )) {
1935- return -1 ;
1936- }
1937-
1938- if (php_stream_gets (redis_sock -> stream , inbuf , 1024 ) == NULL ) {
1939- REDIS_STREAM_CLOSE_MARK_FAILED (redis_sock );
1940- zend_throw_exception (redis_exception_ce , "read error on connection" , 0
1941- TSRMLS_CC );
1942- return -1 ;
1943- }
1944-
1945- if (inbuf [0 ] != '*' ) {
1946- IF_MULTI_OR_PIPELINE () {
1947- add_next_index_bool (z_tab , 0 );
1948- } else {
1949- if (inbuf [0 ] == '-' ) {
1950- err_len = strlen (inbuf + 1 ) - 2 ;
1951- redis_sock_set_err (redis_sock , inbuf + 1 , err_len );
1952- }
1953- RETVAL_FALSE ;
1954- }
1955- return -1 ;
1956- }
1957-
1958- numElems = atoi (inbuf + 1 );
1959- zval zv , * z_multi_result = & zv ;
1960- #if (PHP_MAJOR_VERSION < 7 )
1961- MAKE_STD_ZVAL (z_multi_result );
1962- #endif
1963- array_init (z_multi_result ); /* pre-allocate array for multi's results. */
1964-
1965- redis_mbulk_reply_loop (INTERNAL_FUNCTION_PARAM_PASSTHRU , redis_sock ,
1966- z_multi_result , numElems , UNSERIALIZE_VALS );
1967-
1968- IF_MULTI_OR_PIPELINE () {
1969- add_next_index_zval (z_tab , z_multi_result );
1970- } else {
1971- RETVAL_ZVAL (z_multi_result , 0 , 1 );
1972- }
1973- /*zval_copy_ctor(return_value); */
1974- return 0 ;
1975- }
1976-
1977-
19781917/* Like multibulk reply, but don't touch the values, they won't be unserialized
19791918 * (this is used by HKEYS). */
19801919PHP_REDIS_API int
0 commit comments