Page 1 of 1

isset $this->mError

Posted: Sun May 01, 2005 5:18 am
by shiznatix
i have a var returned from a class but after i call the class i do this

Code: Select all

$conn = new CoolClass;

echo $conn->mError;//this works perfect

if ($conn->mError)//this does NOT work
{
//do stuff
}

if ($conn->mError != NULL)//this does NOT work
{
//do stuff
}
why do the last 2 examples not work when the 1st one does work?

Posted: Sun May 01, 2005 9:00 am
by John Cartwright
Show us the function.

Posted: Sun May 01, 2005 10:24 am
by shiznatix
nevermind for some reason it didnt work last night but now it does work...

Posted: Sun May 01, 2005 10:33 am
by Chris Corbyn
shiznatix wrote:nevermind for some reason it didnt work last night but now it does work...
LOL :P I love it when people say that.

Posted: Sun May 01, 2005 11:13 am
by shiznatix
:cry: i don't but for some reason it seams to happen to me quite often, i think im cursed

Posted: Sun May 01, 2005 2:47 pm
by ol4pr0
LOL, the dumbest thing that happends to me ( Urmm rather often )

Editing a file and Refreshing your page without anychange thinking something didnt work untill you discover that you were editing the wrong file.

Like the backup.. s

Simular look just a differant dir :)

Posted: Mon May 02, 2005 9:51 am
by shiznatix
(this topic should probebly be moved to general discussion)
ol4pr0 wrote:LOL, the dumbest thing that happends to me ( Urmm rather often )

Editing a file and Refreshing your page without anychange thinking something didnt work untill you discover that you were editing the wrong file.

Like the backup.. s

Simular look just a differant dir :)
haha ya i have done that one many times. today, being monday of couse i wasted 2 hours becuase i was doing a while loop and it wasnt working. i couldnt figure it out and after extensive testing i saw that i had done this

Code: Select all

while ($condition = $thing);
{
//stuff here
}
now spot the error!