mirror of
https://github.com/standardebooks/web.git
synced 2025-07-04 22:00:35 -04:00
25 lines
533 B
PHP
25 lines
533 B
PHP
<?
|
|
/**
|
|
* @var ?Exception $exception
|
|
*/
|
|
|
|
if($exception === null){
|
|
return;
|
|
}
|
|
|
|
$exceptions = [];
|
|
|
|
if($exception instanceof Exceptions\ValidationException){
|
|
$exceptions = $exception->Exceptions;
|
|
}
|
|
else{
|
|
$exceptions[] = $exception;
|
|
}
|
|
?>
|
|
<ul class="message error">
|
|
<? foreach($exceptions as $ex){ ?>
|
|
<li>
|
|
<p><? $message = $ex->getMessage(); if($message == ''){ $message = 'An error occurred.'; } ?><?= str_replace('CAPTCHA', '<abbr class="acronym">CAPTCHA</abbr>', Formatter::EscapeHtml($message)) ?></p>
|
|
</li>
|
|
<? } ?>
|
|
</ul>
|