Cannot input empty data to posts
This commit is contained in:
parent
89315c0930
commit
35947befc1
@ -156,6 +156,13 @@ class Posts
|
|||||||
unset($args['_addon']);
|
unset($args['_addon']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($args as $value) {
|
||||||
|
if ($value == '') {
|
||||||
|
Session::flash('info', 'All data must not be empty');
|
||||||
|
Redirect::to('./entry');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->post->entry($table, $args)) {
|
if ($this->post->entry($table, $args)) {
|
||||||
Session::flash('info', 'Data successfuly uploaded');
|
Session::flash('info', 'Data successfuly uploaded');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user