ID:               24499
 Comment by:       jmaguire123 at hotmail dot com
 Reported By:      wks at wks dot ch
 Status:           Closed
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5.0.0b1 (beta1)
 Assigned To:      helly
 New Comment:

I tried the latest CVS snapshot (php5-200407281830.tar.gz)as recommened
above but it did not fix my issue.

I am still seeing:

Undefined property: stdClass::$id 
Undefined property: stdClass::$name

(Using PEAR::DB) with mysql on the back end, here is what I am trying
to do:

$stmt = "SELECT * FROM " . CUSTOMER_TABLE;
$result = $conn->query($stmt);

while ($customer = (object) $result->fetchRow() ) {

        if ($customer->id == $params['cid']) {

                $t->set_var("CID_SELECTED", " selected");

        } else {

                $t->set_var("CID_SELECTED", "");
        }

        $t->set_var("CUSTOMER_ID", $customer->id);
        $t->set_var("CUSTOMER_NAME", $customer->name);

}
etc..


All of the above code worked fine in PHP 4.3.7 (and still does--I
checked).

Broken in PHP 5 (and page goes into an infinate loop of notices) Any
help is greatly appreciated.. Suggest re-opening this bug report.

-John


Previous Comments:
------------------------------------------------------------------------

[2003-07-21 07:13:38] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2003-07-20 12:18:36] [EMAIL PROTECTED]

This affects more than ext/pgsql. some internal facility is wrong it
seems.

------------------------------------------------------------------------

[2003-07-10 08:53:05] wks at wks dot ch

I've just changed the status from documentation to crash 'cause that's
what it does. In more details:

$this->id is a private variable of the class Id
$id->id is a propertie of a PostgreSQL object

php 5.0.0b1 is unable to dereference the $id->id property of the $id
PostgreSQL object !

------------------------------------------------------------------------

[2003-07-05 07:25:26] wks at wks dot ch

There's unfortunately been added a note by someone who hasn't
understood the problem at all.

$this->id is a private variable of the class Id
$id-id is a propertie of a PostgreSQL object

php 5.0.0b1 is unable to derive the $id->id property of the $id
PostgreSQL object !

------------------------------------------------------------------------

[2003-07-05 06:26:07] [EMAIL PROTECTED]

Make it a doc problem since you obviously didn't read the docs. And
close it since it's all your fault :-)

What you're missing....

class {
  private $id;
  function getId() {
    $this->id = 1;
    return $this->id;
  }
}

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24499

-- 
Edit this bug report at http://bugs.php.net/?id=24499&edit=1

Reply via email to