Permalink
Browse files

Fixed some E_NOTICE errors.

  • Loading branch information...
1 parent a869e12 commit 0185ca07fae975e767832e85e8efd7a9069bb7ae @whatthejeff committed Apr 27, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −1 example/blog/controllers/admin.php
  2. +2 −1 example/namespaces/blog/controllers/admin.php
@@ -55,7 +55,8 @@
display('admin/posts/new');
});
post('/admin/posts', function(){
- if (save(new Post())) {
+ $post = new Post();
+ if (save($post)) {
flash('notice', POST_CREATED_MESSAGE);
redirect(p($post['id']));
}
@@ -57,7 +57,8 @@
$breeze->display('admin/posts/new');
});
$breeze->post('/admin/posts', function($breeze){
- if ($breeze->save(new \Post())) {
+ $post = new \Post();
+ if ($breeze->save($post)) {
$breeze->flash('notice', POST_CREATED_MESSAGE);
$breeze->redirect($breeze->p($post['id']));
}

0 comments on commit 0185ca0

Please sign in to comment.