From 95b1460b1302e44d3cb5a4db10cc4082e5d83011 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 12 Sep 2023 12:08:09 +0200 Subject: [PATCH] Fix news delete message --- system/libs/news.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/libs/news.php b/system/libs/news.php index 352b2a1e..fb4afc5d 100644 --- a/system/libs/news.php +++ b/system/libs/news.php @@ -78,12 +78,14 @@ class News if(isset($id)) { $row = ModelsNews::find($id); - if($row) + if($row) { if (!$row->delete()) { $errors[] = 'Fail during delete News.'; } - else + } + else { $errors[] = 'News with id ' . $id . ' does not exists.'; + } } else $errors[] = 'News id not set.';