@@ -5429,7 +5429,7 @@ PHP_METHOD(Redis, object)
5429
5429
RedisSock * redis_sock ;
5430
5430
char * cmd = "" , * info = NULL , * key = NULL ;
5431
5431
int cmd_len , info_len , key_len ;
5432
- long port = 6379 ;
5432
+ // long port = 6379;
5433
5433
5434
5434
if (zend_parse_method_parameters (ZEND_NUM_ARGS () TSRMLS_CC , getThis (), "Oss" ,
5435
5435
& object , redis_ce , & info , & info_len , & key , & key_len ) == FAILURE ) {
@@ -5672,6 +5672,8 @@ redis_build_eval_cmd(RedisSock *redis_sock, char **ret, char *keyword, char *val
5672
5672
cmd_len = redis_cmd_format_static (ret , keyword , "sd" , value , val_len , 0 );
5673
5673
}
5674
5674
5675
+ // Return our command length
5676
+ return cmd_len ;
5675
5677
}
5676
5678
5677
5679
/* {{{ proto variant Redis::evalsha(string script_sha1, [array keys, int num_key_args])
@@ -5737,25 +5739,6 @@ PHP_METHOD(Redis, eval)
5737
5739
REDIS_PROCESS_RESPONSE (redis_read_variant_reply );
5738
5740
}
5739
5741
5740
- // Validate that we've been provided a proper SCRIPT sub command
5741
- PHPAPI int
5742
- validate_script_directive (char * directive ) {
5743
- // Valid SCRIPT sub commands
5744
- char * * valid_cmds = {"flush" , "kill" , "load" , "exists" };
5745
- int cmd_count = 4 , i ;
5746
-
5747
- // Iterate our valid commands
5748
- for (i = 0 ;i < cmd_count ;i ++ ) {
5749
- // If we found a match, return success
5750
- if (!strcasecmp (directive , valid_cmds [i ])) {
5751
- return 0 ;
5752
- }
5753
- }
5754
-
5755
- // Return failure
5756
- return -1 ;
5757
- }
5758
-
5759
5742
PHPAPI int
5760
5743
redis_build_script_exists_cmd (char * * ret , zval * * argv , int argc ) {
5761
5744
// Our command length and iterator
@@ -5786,7 +5769,7 @@ redis_build_script_exists_cmd(char **ret, zval **argv, int argc) {
5786
5769
* {{{ proto int Reids::script('exists', script_sha1 [, script_sha2, ...])
5787
5770
*/
5788
5771
PHP_METHOD (Redis , script ) {
5789
- zval * object , * * z_args ;
5772
+ zval * * z_args ;
5790
5773
RedisSock * redis_sock ;
5791
5774
int cmd_len , argc ;
5792
5775
char * cmd ;
0 commit comments