summaryrefslogtreecommitdiff
path: root/sapi/litespeed/lsapi_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/litespeed/lsapi_main.c')
-rw-r--r--sapi/litespeed/lsapi_main.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index e9632ed927..2b2385ccdf 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -302,29 +302,6 @@ static void litespeed_php_import_environment_variables(zval *array_ptr)
}
}
-
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
-static int add_variable_magic_quote( const char * pKey, int keyLen, const char * pValue, int valLen,
- void * arg )
-{
- zval * gpc_element, **gpc_element_p;
- HashTable * symtable1 = Z_ARRVAL_P((zval * )arg);
- register char * pKey1 = (char *)pKey;
-
- MAKE_STD_ZVAL(gpc_element);
- Z_STRLEN_P( gpc_element ) = valLen;
- Z_STRVAL_P( gpc_element ) = php_addslashes((char *)pValue, valLen, &Z_STRLEN_P( gpc_element ), 0 );
- Z_TYPE_P( gpc_element ) = IS_STRING;
-#if PHP_MAJOR_VERSION > 4
- zend_symtable_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#else
- zend_hash_update( symtable1, pKey1, keyLen + 1, &gpc_element, sizeof( zval *), (void **) &gpc_element_p );
-#endif
- return 1;
-}
-
-#endif
-
/* {{{ sapi_lsapi_register_variables
*/
static void sapi_lsapi_register_variables(zval *track_vars_array)
@@ -336,19 +313,9 @@ static void sapi_lsapi_register_variables(zval *track_vars_array)
litespeed_php_import_environment_variables(track_vars_array);
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
- if (!PG(magic_quotes_gpc)) {
-#endif
- LSAPI_ForeachHeader( add_variable, track_vars_array );
- LSAPI_ForeachEnv( add_variable, track_vars_array );
- add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
-#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
- } else {
- LSAPI_ForeachHeader( add_variable_magic_quote, track_vars_array );
- LSAPI_ForeachEnv( add_variable_magic_quote, track_vars_array );
- add_variable_magic_quote("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
- }
-#endif
+ LSAPI_ForeachHeader( add_variable, track_vars_array );
+ LSAPI_ForeachEnv( add_variable, track_vars_array );
+ add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
} else {
php_import_environment_variables(track_vars_array);