Date: 01/10/01
- Next message: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- Previous message: Max A. Derkachev: "Re: [phplib] template: / in varname"
- In reply to: Peter J.: "[phplib] Object registration as a session variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Peter,
Tuesday, January 09, 2001, 11:21:29 PM, you wrote:
PJ> "Warning: Missing argument in call to classtest() in unit.inc on line ..."
PJ> Example :
PJ> ---------------------------------------------------
PJ> class classtest {
...
PJ> function classtest($param1 ,$param2 ) {
..
PJ> $testobject = new classtest("data1","data2");
PJ> ----------------------------------------------------
PJ> I don't need to put $Param1 and $Param2
PJ> in the persistent_slots array, do I ? (They are the local variables )
PJ> Shall I modify the $classname variable?
You should provide default arguments in the classtest() declaration in case you
intend to call it without arguments.
function classtest($param1 = 0, $param2 = 0) { ....
And the warning will disappear.
-- Best regards, Max A. Derkachev mailto:kot <email protected> Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Christian.Thiele <email protected>: "[phplib] PHPlib: Additional Username"
- Previous message: Max A. Derkachev: "Re: [phplib] template: / in varname"
- In reply to: Peter J.: "[phplib] Object registration as a session variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

