ID: 28420
User updated by: m at saffitz dot com
Reported By: m at saffitz dot com
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: Mac OS 10.3
PHP Version: 5.0.0RC2
New Comment:
Retracting the bug report... appears to not be a PHP
issue.
Previous Comments:
------------------------------------------------------------------------
[2004-05-17 15:44:15] m at saffitz dot com
Description:
------------
I have a very standard session handler I'm writing, with
the write function as below.
I'm using propel (propel.phpdb.org) as an object
persistence layer.
When the function is called automatically by the session
system, the first print statement correctly prints the
session id. However, an exception is thrown when the
record does not yet exist in the database, and the catch
block in entered. Here, the second print statement
incorrectly prints $id, printing instead some path:
Output:
0a900f631d4ebf175f7b85ec262ca7292
/Users/msaffitz/cvswork/aspen-in
Failed to select one and only one row.
/Users/msaffitz/cvswork/aspen-in
Reproduce code:
---------------
public function write( $id, $val ) {
print "$id<br>\n";
try {
$session = SessionsPeer::retrieveByPk($id);
}
catch ( PropelException $exception ) {
print "$id<br>\n";
print $exception->getMessage();
$session = new Sessions();
$session->setId($id);
}
print $id;
$session->setDatavalue($val);
$session->setModificationDate('NOW()');
$session->save();
}
Expected result:
----------------
The variable $id's value should persist.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28420&edit=1