#30009 [NEW]: Using $this when not in object

From: Date: Tue, 07 Sep 2004 11:34:18 +0000
Subject: #30009 [NEW]: Using $this when not in object
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65866@lists.php.net to get a copy of this message
From: onore at ua dot fm Operating system: Windows XP PHP version: 5.0.1 PHP Bug Type: Zend Engine 2 problem Bug description: Using $this when not in object Description: ------------ See reproduce code, error: Fatal error: Using $this when not in object context in C:\Apache\Apache2\htdocs\xxx\admin_start_events.php on line 14 Reproduce code: --------------- function admin_start() { $admin_start_BeforeShow = true; global $admin_start; if( ($this->Visible = (CheckS("3") == "success")) ) { $admin_start->Visible = true; } else { $admin_start->Visible = false; } return $admin_start; } -- Edit bug report at http://bugs.php.net/?id=30009&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30009&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30009&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30009&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30009&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30009&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30009&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30009&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30009&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30009&r=support Expected behavior: http://bugs.php.net/fix.php?id=30009&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30009&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30009&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30009&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30009&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30009&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30009&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30009&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30009&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30009&r=mysqlcfg

« previous php.bugs (#65866) next »