Skip to content

Commit 24f86c4

Browse files
cdocoZiHang Gao
authored andcommitted
Fixed method call problem causes session handler to display two times
1 parent 2d6bf93 commit 24f86c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

redis.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,6 @@ static void add_class_constants(zend_class_entry *ce, int is_cluster TSRMLS_DC)
548548

549549
zend_declare_class_constant_stringl(ce, "AFTER", 5, "after", 5 TSRMLS_CC);
550550
zend_declare_class_constant_stringl(ce, "BEFORE", 6, "before", 6 TSRMLS_CC);
551-
552-
#ifdef PHP_SESSION
553-
php_session_register_module(&ps_mod_redis);
554-
php_session_register_module(&ps_mod_redis_cluster);
555-
#endif
556551
}
557552

558553
/**
@@ -623,6 +618,11 @@ PHP_MINIT_FUNCTION(redis)
623618
/* Add shared class constants to Redis and RedisCluster objects */
624619
add_class_constants(redis_ce, 0 TSRMLS_CC);
625620
add_class_constants(redis_cluster_ce, 1 TSRMLS_CC);
621+
622+
#ifdef PHP_SESSION
623+
php_session_register_module(&ps_mod_redis);
624+
php_session_register_module(&ps_mod_redis_cluster);
625+
#endif
626626

627627
return SUCCESS;
628628
}

0 commit comments

Comments
 (0)