Skip to content
Browse files

Prevent created of an 'id' field when checking for it.

  • Loading branch information...
1 parent 6a771d5 commit c5fba44f54f0d0fc09f3204f9944cdcbaeab68b5 @davidpersson davidpersson committed Feb 8, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 models/Paste.php
View
3 models/Paste.php
@@ -74,7 +74,8 @@ public static function __init($options = array()) {
Paste::applyFilter('save', function($self, $params, $chain) {
$document = $params['entity'];
- if (!$document->id) {
+
+ if (!isset($document->id)) {
$document->created = date('Y-m-d h:i:s');
}
if (!empty($params['data'])) {

0 comments on commit c5fba44

Please sign in to comment.
Something went wrong with that request. Please try again.