don't try to show non-object

This commit is contained in:
Evan Prodromou 2009-07-04 01:17:37 -04:00
parent f63702579a
commit 6d72864618

View File

@ -1028,6 +1028,9 @@ function common_log_objstring(&$object)
if (is_null($object)) { if (is_null($object)) {
return "null"; return "null";
} }
if (!($object instanceof DB_DataObject)) {
return "(unknown)";
}
$arr = $object->toArray(); $arr = $object->toArray();
$fields = array(); $fields = array();
foreach ($arr as $k => $v) { foreach ($arr as $k => $v) {