Update Kirby to 3.7.4

This commit is contained in:
Lukas Bestle
2022-08-23 21:36:13 +02:00
parent 435b9f4541
commit d89a0a647c
674 changed files with 212 additions and 61 deletions

9
kirby/src/Http/Uri.php Executable file → Normal file
View 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);
}