note 54059 deleted from ref.classobj by nlopess
| From: | nlopess@php.net | Date: | Wed, 22 Jun 2005 16:43:54 +0000 |
| Subject: | note 54059 deleted from ref.classobj by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90796@lists.php.net to get a copy of this message | ||
Note Submitter: backglancer at the hotmail
----
Had a strange error, could never figure out why:
<?
if (class_existst('foobar')) return;
class foobar() {
...
}
$foobar = new foobar();
?>
$foobar was never set!!
The walkaround I found is:
<?
if (class_existst('foobar')) return $foobar = new foobar();
class foobar() {
...
}
?>
dirty code on first line, but I like shortcuts;