summaryrefslogtreecommitdiff
path: root/Zend/zend_ini.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-03-13 16:01:31 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-03-13 16:01:31 +0000
commit5ea77bc64f5e79e0aa2a2944bd25f391a32a9fd9 (patch)
treeeabaaa76e920b0b8204d9ccff61ccb71ce899682 /Zend/zend_ini.c
parent7aa69c21dfeee4d537c82191d04b6a65304f62b6 (diff)
downloadphp-git-5ea77bc64f5e79e0aa2a2944bd25f391a32a9fd9.tar.gz
MFB: Fixed bug #43677 (Inconsistent behaviour of include_path set with
php_value). (Patch by: manuel at mausz dot at)
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r--Zend/zend_ini.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index 8034ab2526..4bdb8d8756 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -60,9 +60,11 @@ static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS
}
ini_entry->value = ini_entry->orig_value;
ini_entry->value_length = ini_entry->orig_value_length;
+ ini_entry->modifiable = ini_entry->orig_modifiable;
ini_entry->modified = 0;
ini_entry->orig_value = NULL;
ini_entry->orig_value_length = 0;
+ ini_entry->orig_modifiable = 0;
}
return 0;
}
@@ -246,12 +248,16 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
{
zend_ini_entry *ini_entry;
char *duplicate;
+ zend_bool modifiable;
zend_bool modified;
if (zend_hash_find(EG(ini_directives), name, name_length, (void **) &ini_entry) == FAILURE) {
return FAILURE;
}
+ modifiable = ini_entry->modifiable;
+ modified = ini_entry->modified;
+
if (stage == ZEND_INI_STAGE_ACTIVATE && modify_type == ZEND_INI_SYSTEM) {
ini_entry->modifiable = ZEND_INI_SYSTEM;
}
@@ -262,8 +268,6 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
}
}
- modified = ini_entry->modified;
-
if (!EG(modified_ini_directives)) {
ALLOC_HASHTABLE(EG(modified_ini_directives));
zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
@@ -271,6 +275,7 @@ ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_val
if (!modified) {
ini_entry->orig_value = ini_entry->value;
ini_entry->orig_value_length = ini_entry->value_length;
+ ini_entry->orig_modifiable = modifiable;
ini_entry->modified = 1;
zend_hash_add(EG(modified_ini_directives), name, name_length, &ini_entry, sizeof(zend_ini_entry*), NULL);
}