diff options
author | Zeev Suraski <zeev@php.net> | 2000-10-13 17:07:09 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-10-13 17:07:09 +0000 |
commit | ce51b944615da22027ead4d59257ece97acdaf93 (patch) | |
tree | 6b65e3fef163d3f1fc8b77933d51096f57497e02 | |
parent | d7969026b3da311ea5a5b23bac2b2fe52cd0da8a (diff) | |
download | php-git-ce51b944615da22027ead4d59257ece97acdaf93.tar.gz |
Fix php_value issue
-rw-r--r-- | sapi/apache/mod_php4.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index ccce6b4ff9..09d732dbe6 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -550,11 +550,11 @@ static void copy_per_dir_entry(php_per_dir_entry *per_dir_entry) static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry, php_per_dir_entry *new_per_dir_entry) { - if (orig_per_dir_entry->type==PHP_INI_SYSTEM - && new_per_dir_entry->type!=PHP_INI_SYSTEM) { - return 0; - } else { + if (new_per_dir_entry->type==PHP_INI_SYSTEM + && orig_per_dir_entry->type!=PHP_INI_SYSTEM) { return 1; + } else { + return 0; } } @@ -582,9 +582,10 @@ static void *php_merge_dir(pool *p, void *basev, void *addv) { php_per_dir_entry tmp; - zend_hash_merge_ex((HashTable *) basev, (HashTable *) addv, (copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), (zend_bool (*)(void *, void *)) should_overwrite_per_dir_entry); + /* This function *must* return addv, and not modify basev */ + zend_hash_merge_ex((HashTable *) addv, (HashTable *) basev, (copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), (zend_bool (*)(void *, void *)) should_overwrite_per_dir_entry); /*zend_hash_merge((HashTable *) addv, (HashTable *) basev, (void (*)(void *)) copy_per_dir_entry, &tmp, sizeof(php_per_dir_entry), 0);*/ - return basev; + return addv; } |