Permalink
Browse files

modified LogMessageGenerator to cope with class that cannot be cast t…

…o string.
  • Loading branch information...
1 parent a38ab8a commit 065b28b5c37ceda7213bd00a7dea371da5a56c22 Filippo committed Jul 5, 2010
View
Binary file not shown.
@@ -33,8 +33,7 @@ public static function getLinkForObject($object)
return link_to($object->title, '@show_message?project_id='.$object->project_id.'&message_id='.$object->id);
break;
default:
- $default = (string)$object;
- return (empty($default)) ? get_class($object) : $default;
+ return (method_exists($object, '__toString')) ? (string)$object : get_class($object);
}
}

0 comments on commit 065b28b

Please sign in to comment.