Skip to content

Commit

Permalink
Empty posts bug
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Sep 23, 2017
1 parent 40c5e2e commit 4b3f10e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/lang/de.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ You are not even logged in. = "Du bist nicht mal eingeloggt."
; post.class.php
You need to be logged in to perform this action. = "Du musst angemeldet sein, um diese Aktion durchzuführen."
No data. = "Keine Daten."
; log.class.php
Can't write to %s.log file. = "Kann nicht in %s.log Datei schreiben."
1 change: 1 addition & 0 deletions app/lang/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ You are not even logged in. = "You are not even logged in."

; post.class.php
You need to be logged in to perform this action. = "You need to be logged in to perform this action."
No data. = "No data."

; log.class.php
Can't write to %s.log file. = "Can't write to %s.log file."
6 changes: 5 additions & 1 deletion app/post.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ private static function raw_data($raw_input){

public static function insert($r){
self::login_protected();

$data = self::raw_data($r);

if(empty($data['text'])){
throw new Exception(__("No data."));
}

$data['plain_text'] = $data['text'];
$data['text'] = self::parse_content($data['text']);
$data['datetime'] = 'NOW()';
Expand Down

0 comments on commit 4b3f10e

Please sign in to comment.