@@ -5562,7 +5562,6 @@ PHP_METHOD(Redis, object)
5562
5562
RedisSock * redis_sock ;
5563
5563
char * cmd = "" , * info = NULL , * key = NULL ;
5564
5564
int cmd_len , info_len , key_len ;
5565
- //long port = 6379;
5566
5565
5567
5566
if (zend_parse_method_parameters (ZEND_NUM_ARGS () TSRMLS_CC , getThis (), "Oss" ,
5568
5567
& object , redis_ce , & info , & info_len , & key , & key_len ) == FAILURE ) {
@@ -5883,10 +5882,8 @@ redis_build_script_exists_cmd(char **ret, zval **argv, int argc) {
5883
5882
5884
5883
// Iterate our arguments
5885
5884
for (i = 0 ;i < argc ;i ++ ) {
5886
- // If the argument isn't a string, convert it
5887
- if (Z_TYPE_P (argv [i ]) != IS_STRING ) {
5888
- convert_to_string (argv [i ]);
5889
- }
5885
+ // Convert our argument to a string if we need to
5886
+ convert_to_string (argv [i ]);
5890
5887
5891
5888
// Append this script sha to our SCRIPT EXISTS command
5892
5889
cmd_len = redis_cmd_append_str (ret , cmd_len , Z_STRVAL_P (argv [i ]), Z_STRLEN_P (argv [i ]));
@@ -5947,7 +5944,6 @@ PHP_METHOD(Redis, script) {
5947
5944
} else {
5948
5945
// Unknown directive
5949
5946
efree (z_args );
5950
- zend_throw_exception (redis_exception_ce , "Unknown SCRIPT sub command" , 0 TSRMLS_CC );
5951
5947
RETURN_FALSE ;
5952
5948
}
5953
5949
@@ -5992,10 +5988,8 @@ PHP_METHOD(Redis, dump) {
5992
5988
REDIS_PROCESS_REQUEST (redis_sock , cmd , cmd_len );
5993
5989
IF_ATOMIC () {
5994
5990
redis_ping_response (INTERNAL_FUNCTION_PARAM_PASSTHRU , redis_sock , NULL , NULL );
5995
- //redis_string_response(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, NULL, NULL);
5996
5991
}
5997
5992
REDIS_PROCESS_RESPONSE (redis_ping_response );
5998
- //REDIS_PROCESS_RESPONSE(redis_string_response);
5999
5993
}
6000
5994
6001
5995
/*
@@ -6112,7 +6106,7 @@ PHP_METHOD(Redis, getLastError) {
6112
6106
6113
6107
// Return our last error or NULL if we don't have one
6114
6108
if (redis_sock -> err != NULL && redis_sock -> err_len > 0 ) {
6115
- RETURN_STRING (redis_sock -> err , 1 );
6109
+ RETURN_STRINGL (redis_sock -> err , redis_sock -> err_len , 1 );
6116
6110
} else {
6117
6111
RETURN_NULL ();
6118
6112
}
0 commit comments