@@ -48,7 +48,6 @@ extern zend_class_entry *redis_cluster_ce;
4848zend_class_entry * redis_ce ;
4949zend_class_entry * redis_exception_ce ;
5050extern zend_class_entry * redis_cluster_exception_ce ;
51- static zend_class_entry * spl_ce_RuntimeException = NULL ;
5251
5352extern zend_function_entry redis_array_functions [];
5453extern zend_function_entry redis_cluster_functions [];
@@ -880,31 +879,6 @@ zend_module_entry redis_module_entry = {
880879ZEND_GET_MODULE (redis )
881880#endif
882881
883- PHP_REDIS_API zend_class_entry * redis_get_exception_base (int root TSRMLS_DC )
884- {
885- #if HAVE_SPL
886- if (!root ) {
887- if (!spl_ce_RuntimeException ) {
888- zend_class_entry * pce ;
889-
890- if ((pce = zend_hash_str_find_ptr (CG (class_table ), "runtimeexception" ,
891- sizeof ("RuntimeException" ) - 1 )))
892- {
893- spl_ce_RuntimeException = pce ;
894- return pce ;
895- }
896- } else {
897- return spl_ce_RuntimeException ;
898- }
899- }
900- #endif
901- #if (PHP_MAJOR_VERSION == 5 ) && (PHP_MINOR_VERSION < 2 )
902- return zend_exception_get_default ();
903- #else
904- return zend_exception_get_default (TSRMLS_C );
905- #endif
906- }
907-
908882/* Send a static DISCARD in case we're in MULTI mode. */
909883static int
910884redis_send_discard (RedisSock * redis_sock TSRMLS_DC )
@@ -1173,10 +1147,10 @@ PHP_MINIT_FUNCTION(redis)
11731147 redis_exception_ce = zend_register_internal_class_ex (
11741148 & redis_exception_class_entry ,
11751149#if (PHP_MAJOR_VERSION < 7 )
1176- redis_get_exception_base (0 TSRMLS_CC ),
1150+ redis_get_exception_base (TSRMLS_C ),
11771151 NULL TSRMLS_CC
11781152#else
1179- redis_get_exception_base (0 )
1153+ redis_get_exception_base (TSRMLS_C )
11801154#endif
11811155 );
11821156
@@ -1186,10 +1160,10 @@ PHP_MINIT_FUNCTION(redis)
11861160 redis_cluster_exception_ce = zend_register_internal_class_ex (
11871161 & redis_cluster_exception_class_entry ,
11881162#if (PHP_MAJOR_VERSION < 7 )
1189- rediscluster_get_exception_base ( 0 TSRMLS_CC ),
1163+ redis_get_exception_base ( TSRMLS_C ),
11901164 NULL TSRMLS_CC
11911165#else
1192- rediscluster_get_exception_base ( 0 )
1166+ redis_get_exception_base ( TSRMLS_C )
11931167#endif
11941168 );
11951169
0 commit comments