Skip to content

Commit

Permalink
setting a default name if there is none
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed May 25, 2012
1 parent aa9ba4c commit d37195e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/Trash/Model/Behavior/TrashableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function beforeDelete($Model, $cascade = true) {
$data = array(
'model' => $Model->modelName(),
'foreign_key' => $Model->id,
'name' => $item[$Model->alias][$Model->displayField],
'name' => !empty($item[$Model->alias][$Model->displayField]) ? $item[$Model->alias][$Model->displayField] : __d('trash', 'Unknown'),
'data' => serialize($Model->data),
'deleted' => date('Y-m-d H:i:s'),
'deleted_by' => $userId
Expand Down

0 comments on commit d37195e

Please sign in to comment.