Skip to content

Commit

Permalink
Fixed strict error in uuid behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjsaylor committed Sep 8, 2013
1 parent 5aea89f commit 4b7c1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Plugin/Utility/Model/Behavior/UuidableBehavior.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
class UuidableBehavior extends ModelBehavior {

public function beforeSave($model) {
public function beforeSave(Model $model) {
if(empty($model->id) && $model->hasField('uuid')) {
$model->data[$model->alias]['uuid'] = String::uuid();
}
return true;
}

}
}

0 comments on commit 4b7c1a3

Please sign in to comment.