Re: Re: cvs: php4(PHP_4_2_0) /ext/standard math.c
| From: | Yasuo Ohgaki | Date: | Mon, 24 Jun 2002 11:17:39 +0000 |
| Subject: | Re: Re: cvs: php4(PHP_4_2_0) /ext/standard math.c | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-85523@lists.php.net to get a copy of this message | ||
Edin Kadribasic wrote:
Ok. I didn't understand whole function, so I mgiht be wrong. If empty_string is enough to know there is an error, E_NOTICE would be nice, since PHP should not raise warning that may depends of user inputs. IMO. It seems it's rare to have error with this function (user should check input before supply value to the function, probably) It's not important, though. Just checking error raising policy. -- Yasuo OhgakiTo get this warning you need to try base convert of a *very* large number ( > 1500 digits). This would indicate to me that something went wrong so an E_WARNING is in order. Edin+ /* Don't try to convert +/- infinity */ + if (fvalue == HUGE_VAL || fvalue == -HUGE_VAL) { + php_error(E_WARNING, "Number too large in %s() call", + get_active_function_name(TSRMLS_C));Isn't E_WARNING is better to be E_NOTICE?