Re: PHP 4.0 Bug #7895: Missing Arguments Generates E-WARNING
| From: | Zeev Suraski | Date: | Mon, 20 Nov 2000 21:23:27 +0000 |
| Subject: | Re: PHP 4.0 Bug #7895: Missing Arguments Generates E-WARNING | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38692@lists.php.net to get a copy of this message | ||
Missing arguments are supposed to generate E_WARNING, not E_NOTICE (as I told you back then...). It has really nothing with variable-length argument lists. PHP allows you to send more arguments than you need without warning you about it (so that you can implement variable length argument lists), but if you actually declare that the function accepts certain arguments, the assumption is that they're required (unless you give them default values).
Zeev
At 23:11 20/11/2000, sowens@digalch.com wrote:
-- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/From: sowens@digalch.comOperating system: AnyPHP version: 4.0.3pl1 PHP Bug Type: *Function SpecificBug description: Missing Arguments Generates E-WARNING We have just upgraded from 4.0.0 to 4.0.3pl1 and we are having the same problem. That is, under 4.0.0, the absence of parameters when calling a function does NOT generate a warning, but under 4.0.3pl1, we get this warning and we do NOT want it. However, we do want to see other warnings so we are hesitant to suppress other warnings by adding "& ~E_WARNING". We feel that this situation should be an E_NOTICE, not an E_WARNING. This was reported under a different bug on 11/3 and Zeev has said that it was not a problem, but I think there is some confusion because this simply was not a warning under PHP4.0.0 and because variable length argument lists are a new feature in 4.0, we strongly feel this should not be issued as an error. -- Edit Bug report at: http://bugs.php.net/?id=7895&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net