aboutsummaryrefslogtreecommitdiffstats
path: root/admin/page/insert.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-08-05 18:19:19 +0200
committerThomas Lange <code@nerdmind.de>2021-08-05 18:27:08 +0200
commita0722c6d149b253a320976a64aad6e57ab1cccd7 (patch)
tree12529b8ffb17043e956b2afe4cb28359f28eec5b /admin/page/insert.php
parentde51f59ef9a50bce0ef63a883c590d1feeadca5d (diff)
downloadblog-a0722c6d149b253a320976a64aad6e57ab1cccd7.tar.gz
blog-a0722c6d149b253a320976a64aad6e57ab1cccd7.tar.xz
blog-a0722c6d149b253a320976a64aad6e57ab1cccd7.zip
Don't check return value of insert/delete methods
Don't check the return value of the Repository's "insert" and "delete" methods in the administration controllers for creating and modifying entities since a PDOException is thrown if an error occurs.
Diffstat (limited to 'admin/page/insert.php')
-rw-r--r--admin/page/insert.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/admin/page/insert.php b/admin/page/insert.php
index c1d9e5d..915fee5 100644
--- a/admin/page/insert.php
+++ b/admin/page/insert.php
@@ -35,9 +35,8 @@ if(HTTP::issetPOST('insert')) {
if(HTTP::issetPOST(['token' => Application::getSecurityToken()])) {
try {
- if($PageRepository->insert($Page)) {
- HTTP::redirect(Application::getAdminURL('page/'));
- }
+ $PageRepository->insert($Page);
+ HTTP::redirect(Application::getAdminURL('page/'));
} catch(PDOException $Exception) {
$messages[] = $Exception->getMessage();
}