mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 06:45:14 -04:00
Some type safety checks and rearrange file upload and mime type check code
This commit is contained in:
parent
362fb52d7d
commit
a2de3c3ecb
3 changed files with 16 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
|||
<?
|
||||
use function Safe\parse_url;
|
||||
|
||||
class Museum extends PropertiesBase{
|
||||
public int $MuseumId;
|
||||
public string $Name;
|
||||
|
@ -16,6 +18,10 @@ class Museum extends PropertiesBase{
|
|||
throw new Exceptions\InvalidUrlException($url);
|
||||
}
|
||||
|
||||
if(!isset($parsedUrl['host'])){
|
||||
throw new Exceptions\InvalidUrlException($url);
|
||||
}
|
||||
|
||||
$result = Db::Query('
|
||||
SELECT *
|
||||
from Museums
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue