From a3b005d184c5ce4cfced9ea5e695e05ae0492248 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 21 Apr 2018 18:58:02 +0200 Subject: [PATCH] Fix issues --- RestControllers/commentsController.php | 2 +- classes/components/comments.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RestControllers/commentsController.php b/RestControllers/commentsController.php index ca28cb8..2ac54f4 100644 --- a/RestControllers/commentsController.php +++ b/RestControllers/commentsController.php @@ -188,7 +188,7 @@ class commentsController { $data["userID"] = $comment->get_userID(); $data["postID"] = $comment->get_postID(); $data["time_sent"] = $comment->get_time_sent(); - $data["content"] = $comment->get_content(); + $data["content"] = $comment->has_content() ? $comment->get_content() : ""; $data["img_path"] = $comment->has_img_path() ? $comment->get_img_path() : null; $data["img_url"] = $comment->has_img_url() ? $comment->get_img_url() : null; diff --git a/classes/components/comments.php b/classes/components/comments.php index b9456ed..993acbb 100644 --- a/classes/components/comments.php +++ b/classes/components/comments.php @@ -290,7 +290,7 @@ class Comments { //Check for image if($data["image_commentaire"] != ""){ $comment->set_img_path(str_replace("file:", "", $data["image_commentaire"])); - $info->set_img_url(path_user_data($info->get_img_path(), false)); + $comment->set_img_url(path_user_data($comment->get_img_path(), false)); } if($load_likes){