[PHP4BETA] CVS update: php4
| From: | zeev | Date: | Sat, 22 May 1999 12:19:57 +0000 |
| Subject: | [PHP4BETA] CVS update: php4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-989@lists.php.net to get a copy of this message | ||
Date: Saturday May 22, 1999 @ 8:19
Author: zeev
Update of /repository/php4
In directory php:/tmp/cvs-serv7917
Modified Files:
main.c php_ini.c
Log Message:
More fixes. Should hopefully work well now.
Index: php4/main.c
diff -u php4/main.c:1.62 php4/main.c:1.63
--- php4/main.c:1.62 Sat May 22 06:56:36 1999
+++ php4/main.c Sat May 22 08:19:56 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.62 1999/05/22 10:56:36 zeev Exp $ */
+/* $Id: main.c,v 1.63 1999/05/22 12:19:56 zeev Exp $ */
#include <stdio.h>
@@ -1233,7 +1233,6 @@
php3_header(); /* Make sure headers have been sent */
zend_end_ob_buffering(1);
- fprintf(stderr, "%d all done\n", getpid());
return (OK);
}
#endif /* APACHE */
Index: php4/php_ini.c
diff -u php4/php_ini.c:1.19 php4/php_ini.c:1.20
--- php4/php_ini.c:1.19 Sat May 22 07:34:21 1999
+++ php4/php_ini.c Sat May 22 08:19:57 1999
@@ -153,7 +153,7 @@
if (!ini_entry->on_modify
|| ini_entry->on_modify(ini_entry, duplicate, new_value_length, ini_entry->mh_arg1,
ini_entry->mh_arg2, ini_entry->mh_arg3)==SUCCESS) {
- if (!ini_entry->orig_value) {
+ if (!ini_entry->modified) {
ini_entry->orig_value = ini_entry->value;
ini_entry->orig_value_length = ini_entry->value_length;
} else { /* we already changed the value, free the changed value */
@@ -178,9 +178,7 @@
return FAILURE;
}
- if (ini_entry->orig_value) {
- php_restore_ini_entry_cb(ini_entry);
- }
+ php_restore_ini_entry_cb(ini_entry);
return SUCCESS;
}
@@ -208,8 +206,8 @@
php_ini_entry *ini_entry;
if (_php3_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS)
{
- if (orig && ini_entry->orig_value) {
- return strtol(ini_entry->orig_value, NULL, 0);
+ if (orig && ini_entry->modified) {
+ return (ini_entry->orig_value ? strtol(ini_entry->orig_value, NULL, 0) : 0);
} else if (ini_entry->value) {
return strtol(ini_entry->value, NULL, 0);
}
@@ -224,8 +222,8 @@
php_ini_entry *ini_entry;
if (_php3_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS)
{
- if (orig && ini_entry->orig_value) {
- return (double) strtod(ini_entry->orig_value, NULL);
+ if (orig && ini_entry->modified) {
+ return (double) (ini_entry->orig_value ? strtod(ini_entry->orig_value, NULL) : 0.0);
} else if (ini_entry->value) {
return (double) strtod(ini_entry->value, NULL);
}
@@ -240,7 +238,7 @@
php_ini_entry *ini_entry;
if (_php3_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS)
{
- if (orig && ini_entry->orig_value) {
+ if (orig && ini_entry->modified) {
return ini_entry->orig_value;
} else {
return ini_entry->value;
@@ -260,9 +258,14 @@
char *display_string;
uint display_string_length;
- if (type==PHP_INI_DISPLAY_ORIG && ini_entry->orig_value) {
- display_string = ini_entry->orig_value;
- display_string_length = ini_entry->orig_value_length;
+ if (type==PHP_INI_DISPLAY_ORIG && ini_entry->modified) {
+ if (ini_entry->orig_value) {
+ display_string = ini_entry->orig_value;
+ display_string_length = ini_entry->orig_value_length;
+ } else {
+ display_string = "<i>no value</i>";
+ display_string_length = sizeof("<i>no value</i>")-1;
+ }
} else if (ini_entry->value && ini_entry->value[0]) {
display_string = ini_entry->value;
display_string_length = ini_entry->value_length;
@@ -279,8 +282,8 @@
{
int value;
- if (type==PHP_INI_DISPLAY_ORIG && ini_entry->orig_value) {
- value = atoi(ini_entry->orig_value);
+ if (type==PHP_INI_DISPLAY_ORIG && ini_entry->modified) {
+ value = (ini_entry->orig_value ? atoi(ini_entry->orig_value) : 0);
} else if (ini_entry->value) {
value = atoi(ini_entry->value);
} else {
@@ -298,7 +301,7 @@
{
char *value;
- if (type==PHP_INI_DISPLAY_ORIG && ini_entry->orig_value) {
+ if (type==PHP_INI_DISPLAY_ORIG && ini_entry->modified) {
value = ini_entry->orig_value;
} else if (ini_entry->value) {
value = ini_entry->value;
--
PHP 4 Beta