#20338 [NEW]: isset does not work with referenced objects like ->

From: Date: Sun, 10 Nov 2002 15:03:24 +0000
Subject: #20338 [NEW]: isset does not work with referenced objects like ->
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-24434@lists.php.net to get a copy of this message
From: ewvea3dgc7001@sneakemail.com Operating system: Redhat 7.2 PHP version: 4.2.3 PHP Bug Type: Variables related Bug description: isset does not work with referenced objects like -> The following code produces an error if ( isset($adodbobject->Fields('myresult') ) ) { // do something } PHP throws an error ( not warning ) saying: Parse error: parse error, expecting ','' or ')'' in /path/to/index.php on line 45 However, when I modify the isset to look like this: $_q = $adodbobject->Fields('myresult'); if ( isset($_q) ) { // do something } It works fine. Is this proper behavior for isset, or is this a php bug? I can't search google groups for "->", or any other search engine for that matter. So it has been tough trying to see if anyone else gets this error. -- Edit bug report at http://bugs.php.net/?id=20338&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20338&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20338&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20338&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20338&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20338&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20338&r=support Expected behavior: http://bugs.php.net/fix.php?id=20338&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20338&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20338&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20338&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20338&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20338&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20338&r=isapi

« previous php.bugs (#24434) next »