cvs: php4 /sapi/apache mod_php4.c
| From: | Zeev Suraski | Date: | Fri, 13 Oct 2000 17:07:09 +0000 |
| Subject: | cvs: php4 /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2045@lists.php.net to get a copy of this message | ||
zeev Fri Oct 13 10:07:09 2000 EDT
Modified files:
/php4/sapi/apache mod_php4.c
Log:
Fix php_value issue
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.71 php4/sapi/apache/mod_php4.c:1.72
--- php4/sapi/apache/mod_php4.c:1.71 Wed Oct 11 09:24:35 2000
+++ php4/sapi/apache/mod_php4.c Fri Oct 13 10:07:09 2000
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.71 2000/10/11 16:24:35 zeev Exp $ */
+/* $Id: mod_php4.c,v 1.72 2000/10/13 17:07:09 zeev Exp $ */
#define NO_REGEX_EXTRA_H
#ifdef WIN32
@@ -550,11 +550,11 @@
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 @@
{
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;
}