From 819ac24f8bcd468a62b3916fb52cb09a0e1d94f7 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+github@gmail.com> Date: Thu, 30 Jun 2022 16:07:06 +0200 Subject: [PATCH] use correct method calls, fixes #1239 --- lib/classes/AuthorObject.class.php | 2 +- lib/classes/DatabaseObject.class.php | 8 +++----- lib/classes/StudipObject.class.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/classes/AuthorObject.class.php b/lib/classes/AuthorObject.class.php index 7a9be4690ea..d5e35b601e4 100644 --- a/lib/classes/AuthorObject.class.php +++ b/lib/classes/AuthorObject.class.php @@ -231,7 +231,7 @@ class AuthorObject return; } $this->throwError($no, $str, $line, $file, ERROR_CRITICAL); - echo createErrorReport($this, "Schwerer PHP-Laufzeitfehler"); + echo MessageBox::error("Schwerer PHP-Laufzeitfehler"); } } diff --git a/lib/classes/DatabaseObject.class.php b/lib/classes/DatabaseObject.class.php index b3962e21e93..22e8df2ad6f 100644 --- a/lib/classes/DatabaseObject.class.php +++ b/lib/classes/DatabaseObject.class.php @@ -86,7 +86,7 @@ class DatabaseObject extends AuthorObject public function setObjectID($objectID) { if (empty ($objectID)) - throwError(1, _("Die ObjectID darf nicht leer sein.")); + $this->throwError(1, _("Die ObjectID darf nicht leer sein.")); else $this->objectID = $objectID; } @@ -112,7 +112,7 @@ class DatabaseObject extends AuthorObject public function setAuthorID($authorID) { if (empty ($authorID)) - throwError(1, _("Die AuthorID darf nicht leer sein.")); + $this->throwError(1, _("Die AuthorID darf nicht leer sein.")); else $this->authorID = $authorID; } @@ -138,11 +138,9 @@ class DatabaseObject extends AuthorObject public function setRangeID($rangeID) { if (empty ($rangeID)) - throwError(1, _("Die RangeID darf nicht leer sein.")); + $this->throwError(1, _("Die RangeID darf nicht leer sein.")); else $this->rangeID = $rangeID; } } - -?> diff --git a/lib/classes/StudipObject.class.php b/lib/classes/StudipObject.class.php index c783b586e14..840e91baa8a 100644 --- a/lib/classes/StudipObject.class.php +++ b/lib/classes/StudipObject.class.php @@ -161,7 +161,7 @@ class StudipObject extends AuthorObject { */ function setAuthorID ($authorID) { if (empty ($authorID)) - throwError (1, _("Die AuthorID darf nicht leer sein.")); + $this->throwError (1, _("Die AuthorID darf nicht leer sein.")); else $this->authorID = $authorID; } -- GitLab