Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #3098 $do->_lastError not accessible through PEAR::getStaticVariable()
Submitted: 2005-01-04 21:03 UTC
From: ate2 at cornell dot edu Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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 : 23 + 19 = ?

 
 [2005-01-04 21:03 UTC] ate2 at cornell dot edu
Description: ------------ DBDO documentation says you can access the _lastError property in two ways: 1. directly 2. through PEAR::getStaticProperty() The 2nd option doesn't seem to work and there's nothing in the code to suggest that it should work (no calls to set up such a reference in the first place). Although it's easy enough to get around this by writing my own fixes I think it does make sense to provide a standard, public way to access the last error. Also it would be helpful if there were a way to access the last error for a specific instance of DBDO (i.e. $do->lastError() and $do->staticLastError() ) Reproduce code: --------------- $e2 = &PEAR::getStaticProperty( "DB_DataObject", "lastError" ); $e =& $record->_lastError; if (PEAR::isError($e)) { $db->rollback(); echo "<pre>\nError:\n"; print_r($e2); echo "</pre>"; exit; } Expected result: ---------------- Error: DB_DataObject_Error object ( ... lots of stuff here ... ) Actual result: -------------- Error:

Comments

 [2005-01-22 03:28 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!