reference calling for objstring

darcs-hash:20080622142713-34904-1cee0bb3dbf54ad9ebb27b9c99fe4166dca3f9e2.gz
This commit is contained in:
Evan Prodromou 2008-06-22 10:27:13 -04:00
parent e69f28faab
commit 313999fc7d

View File

@ -762,13 +762,13 @@ function common_debug($msg, $filename=NULL) {
} }
} }
function common_log_db_error($object, $verb, $filename=NULL) { function common_log_db_error(&$object, $verb, $filename=NULL) {
$objstr = common_log_objstring($ojbect); $objstr = common_log_objstring($object);
$last_error = &PEAR::getStaticProperty('DB_DataObject','lastError'); $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
common_log(LOG_ERROR, $last_error->message . '(' . $verb . ' on ' . $objstr . ')', $filename); common_log(LOG_ERROR, $last_error->message . '(' . $verb . ' on ' . $objstr . ')', $filename);
} }
function common_log_objstring($object) { function common_log_objstring(&$object) {
if (is_null($object)) { if (is_null($object)) {
return "NULL"; return "NULL";
} }