Re: new warning messages in PHP 4.0.1?
| From: | Hans Lellelid | Date: | Fri, 30 Jun 2000 14:03:41 +0000 |
| Subject: | Re: new warning messages in PHP 4.0.1? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4023@lists.php.net to get a copy of this message | ||
>function blutti($foo) {
> $...
>}
>
>and call it with only blutti(); the error occur.
If you want to be able to call function blutti() without any parameters, you
need to specify a default value for $foo in your function declaration.
Like:
function blutti($foo=0) {
$...
}
I didn't think that was a new warning message, but it's possible...
HTH,
Hans Lellelid
----- Original Message -----
From: "Johan Björk" <johan@websidorna.com>
To: <php-general@lists.php.net>
Sent: Friday, June 30, 2000 9:55 AM
Subject: [PHP] new warning messages in PHP 4.0.1?
I was just trying to upgrade a PHP 4.0 prerelease to PHP 4.0.1, which went
okay, until I noticed that the new version is complaining about "missing
argument 1 to function blutti()" ... and so on. That has never happened in
earlier versions!
If I have a function like:
function blutti($foo) {
$...
}
and call it with only blutti(); the error occur.
What have happened? Is it some change in specifications or what?
---
Johan Björk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net