diff options
author | Andrejs Verza <andrejs.verza@zabbix.com> | 2022-11-04 16:29:29 +0300 |
---|---|---|
committer | Andrejs Verza <andrejs.verza@zabbix.com> | 2022-11-04 16:29:29 +0300 |
commit | 4c248f3b3f2c1c14f844e0d3475106d539570f85 (patch) | |
tree | 35bfd4dd0045a9adeb0cc1ab7f9b56a4838d6090 /ui | |
parent | d40d64aee3129b29b4ffdda03a30a2c4e22cc3f1 (diff) |
..F....... [ZBXNEXT-7469] fixed page loading errors #4
Diffstat (limited to 'ui')
-rw-r--r-- | ui/include/classes/core/ZBase.php | 7 | ||||
-rw-r--r-- | ui/include/classes/mvc/CPageNotFoundException.php | 27 |
2 files changed, 1 insertions, 33 deletions
diff --git a/ui/include/classes/core/ZBase.php b/ui/include/classes/core/ZBase.php index 0b57fbb5c83..a17c44df2f4 100644 --- a/ui/include/classes/core/ZBase.php +++ b/ui/include/classes/core/ZBase.php @@ -562,7 +562,7 @@ class ZBase { try { if ($action_class === null) { - throw new CPageNotFoundException(); + throw new Exception(_('Page not found')); } if (!class_exists($action_class)) { @@ -626,11 +626,6 @@ class ZBase { catch (CAccessDeniedException $e) { $this->denyPageAccess($router); } - catch (CPageNotFoundException $e) { - http_response_code(404); - - self::terminateWithError($router, $e->getMessage()); - } catch (Exception $e) { self::terminateWithError($router, $e->getMessage()); } diff --git a/ui/include/classes/mvc/CPageNotFoundException.php b/ui/include/classes/mvc/CPageNotFoundException.php deleted file mode 100644 index 648ac816f2d..00000000000 --- a/ui/include/classes/mvc/CPageNotFoundException.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php declare(strict_types = 0); -/* -** Zabbix -** Copyright (C) 2001-2022 Zabbix SIA -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -**/ - - -class CPageNotFoundException extends Exception { - - public function __construct($code = 0, Throwable $previous = null) { - parent::__construct(_('Page not found'), $code, $previous); - } -} |