From bf53fec69c831e5ffc0ccf2dd7d37631266e8380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCllers?= Date: Fri, 27 Sep 2013 14:39:37 +0200 Subject: [PATCH] Fix kommentare --- app/routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.php b/app/routes.php index 59ac89e..9fc158d 100644 --- a/app/routes.php +++ b/app/routes.php @@ -111,7 +111,7 @@ Route::post('comment', array('as' => 'comment', function() { $c->film = Input::get('film'); $c->user = Input::get('user'); $c->text = Input::get('text'); - $c->bewertung = Input::get('rate'); + $c->bewertung = !is_null(Input::get('rate')) ? Input::get('rate') : 0; $c->save(); return Redirect::to('film/' . Input::get('film')); }));