mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
Normalize URLs when submitting artwork to database
This commit is contained in:
parent
f9c873003e
commit
e17a4bcc65
10 changed files with 182 additions and 29 deletions
12
lib/Exceptions/InvalidUrlException.php
Normal file
12
lib/Exceptions/InvalidUrlException.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?
|
||||
namespace Exceptions;
|
||||
|
||||
class InvalidUrlException extends AppException{
|
||||
protected $message = 'Invalid URL.';
|
||||
|
||||
public function __construct(?string $url = null){
|
||||
if($url !== null){
|
||||
parent::__construct('Invalid URL: “' . $url . '”.');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue