php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20338 isset does not work with referenced objects like ->
Submitted: 2002-11-10 09:03 UTC Modified: 2002-11-10 09:06 UTC
From: ewvea3dgc7001 at sneakemail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.3 OS: Redhat 7.2
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 + 39 = ?
Subscribe to this entry?

 
 [2002-11-10 09:03 UTC] ewvea3dgc7001 at sneakemail dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-10 09:06 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 10:01:28 2024 UTC