[PHP4BETA] CVS update: php4

From: Date: Mon, 12 Apr 1999 16:35:26 +0000
Subject: [PHP4BETA] CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-90@lists.php.net to get a copy of this message
Date: Monday April 12, 1999 @ 12:35 Author: ssb Update of /repository/php4 In directory php:/tmp/cvs-serv23682 Modified Files: php_ini.c Log Message: tolerate uninitialized ini settings in php_ini_{long,double,string}() Index: php4/php_ini.c diff -u php4/php_ini.c:1.9 php4/php_ini.c:1.10 --- php4/php_ini.c:1.9 Sat Apr 10 12:25:23 1999 +++ php4/php_ini.c Mon Apr 12 12:35:25 1999 @@ -189,9 +189,9 @@ if (_php3_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) { if (orig && ini_entry->orig_value) { - return (long) atoi(ini_entry->orig_value); - } else { - return (long) atoi(ini_entry->value); + return strtol(ini_entry->orig_value, NULL, 0); + } else if (ini_entry->value) { + return strtol(ini_entry->value, NULL, 0); } } @@ -206,7 +206,7 @@ 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); - } else { + } else if (ini_entry->value) { return (double) strtod(ini_entry->value, NULL); } } @@ -222,7 +222,7 @@ if (_php3_hash_find(&known_directives, name, name_length, (void **) &ini_entry)==SUCCESS) { if (orig && ini_entry->orig_value) { return ini_entry->orig_value; - } else { + } else if (ini_entry->value) { return ini_entry->value; } } -- PHP 4 Beta

« previous php.version4 (#90) next »