From 00169ec00ffa56c761191de6ebeb47e9169feba1 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Mon, 23 May 2011 01:47:06 +0000 Subject: [PATCH] - Fixed bug #54529 (SAPI crashes on apache_config.c:197) patch by: hebergement at riastudio dot fr --- NEWS | 4 ++++ sapi/apache2handler/apache_config.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 62bb94be838..f0cd89ba670 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,10 @@ PHP NEWS . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using TMPDIR on Windows). (Pierre) . Fixed bug 54866 (incorrect accounting for realpath_cache_size) (Dustin Ward) + +- Apache2 Handler SAPI: + . Fixed bug #54529 (SAPI crashes on apache_config.c:197). + (hebergement at riastudio dot fr) - cURL: . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre) diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index e48e23b1358..37a2195ab93 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -192,11 +192,12 @@ void apply_config(void *dummy) zend_hash_get_current_key_ex(&d->config, &str, &str_len, NULL, 0, NULL) == HASH_KEY_IS_STRING; zend_hash_move_forward(&d->config)) { - zend_hash_get_current_data(&d->config, (void **) &data); - phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value)); - if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) { - phpapdebug((stderr, "..FAILED\n")); - } + if (zend_hash_get_current_data(&d->config, (void **) &data) == SUCCESS) { + phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value)); + if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) { + phpapdebug((stderr, "..FAILED\n")); + } + } } }