From 94e5539d75ef610f41c9a23195e0ba9c674513ee Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 12 May 2023 10:23:58 +0200 Subject: [PATCH] reset errors if new is set --- includes/model/class-follower.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/model/class-follower.php b/includes/model/class-follower.php index 6c03fd8..a663270 100644 --- a/includes/model/class-follower.php +++ b/includes/model/class-follower.php @@ -224,6 +224,18 @@ class Follower { return null; } + /** + * Set new Error + * + * @param mixed $error The latest HTTP-Error. + * + * @return void + */ + public function set_error( $error ) { + $this->errors = array(); + $this->error = $error; + } + /** * Get the errors. *