strcat(p, "=");
strcat(p, data);
- if (PG(magic_quotes_gpc)) {
- php_stripslashes(p, &l TSRMLS_CC);
- }
#ifndef PHP_WIN32
*ep = p;
++ep;
break;
case HASH_KEY_IS_LONG:
memcpy(p,data,el_len);
- if (PG(magic_quotes_gpc)) {
- php_stripslashes(p, &el_len TSRMLS_CC);
- }
#ifndef PHP_WIN32
*ep = p;
++ep;
void _php_import_environment_variables(zval *array_ptr TSRMLS_DC)
{
char **env, *p, *t;
+ /* turn off magic_quotes while importing environment variables */
+ int magic_quotes_gpc = PG(magic_quotes_gpc);
+ PG(magic_quotes_gpc) = 0;
for (env = environ; env != NULL && *env != NULL; env++) {
p = strchr(*env, '=');
php_register_variable(t, p+1, array_ptr TSRMLS_CC);
efree(t);
}
+ PG(magic_quotes_gpc) = magic_quotes_gpc;
}