Update Kirby to 3.7.4
This commit is contained in:
9
kirby/src/Http/Uri.php
Executable file → Normal file
9
kirby/src/Http/Uri.php
Executable file → Normal file
@@ -90,6 +90,13 @@ class Uri
|
||||
*/
|
||||
protected $scheme = 'http';
|
||||
|
||||
/**
|
||||
* Supported schemes
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $schemes = ['http', 'https', 'ftp'];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -446,7 +453,7 @@ class Uri
|
||||
*/
|
||||
public function setScheme(string $scheme = null)
|
||||
{
|
||||
if ($scheme !== null && in_array($scheme, ['http', 'https', 'ftp']) === false) {
|
||||
if ($scheme !== null && in_array($scheme, static::$schemes) === false) {
|
||||
throw new InvalidArgumentException('Invalid URL scheme: ' . $scheme);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user