1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-16 03:34:33 +02:00

Update ProcessPageEdit so that it detects when the same error message might get shown twice and prevents it from happening

This commit is contained in:
Ryan Cramer
2020-01-31 11:21:08 -05:00
parent 92ef3bbbc3
commit 3d2648ef01

View File

@@ -2068,7 +2068,14 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
}
} catch(\Exception $e) {
$this->error($e->getMessage());
$show = true;
$message = $e->getMessage();
foreach($this->errors('all') as $error) {
if(strpos($error, $message) === false) continue;
$show = false;
break;
}
if($show) $this->error($message);
}
}
}