RE: [PHP] Empty Reference to an Object

2004-01-13 Thread Ford, Mike [LSS]
On 13 January 2004 15:10, Sebastian Ossio wrote: > Hi, > > I´m trying to give an empty reference as a parameter, in a > function. Or > rather make a parameter that is a reference optional. > > I have a function that should react differently if it is > given an object > or not. It works, but it g

Re: [PHP] Empty Reference to an Object

2004-01-13 Thread Jimmy Lantz
At 16:14 2004-01-13, you wrote: Hello Sebastian, Tuesday, January 13, 2004, 3:09:39 PM, you wrote: SO> I cannot believe that there is no way of making an object parameter SO> optional. function ($parameter1, $parameter2 = NULL) { // etc } If passed to your function, $parameter2 will be your obje

Re: [PHP] Empty Reference to an Object

2004-01-13 Thread Richard Davey
Hello Sebastian, Tuesday, January 13, 2004, 3:09:39 PM, you wrote: SO> I cannot believe that there is no way of making an object parameter SO> optional. function ($parameter1, $parameter2 = NULL) { // etc } If passed to your function, $parameter2 will be your object (or string or whatever you

[PHP] Empty Reference to an Object

2004-01-13 Thread Sebastian Ossio
Hi, I´m trying to give an empty reference as a parameter, in a function. Or rather make a parameter that is a reference optional. I have a function that should react differently if it is given an object or not. It works, but it gives me a warning that the second argument is not being given obv