Upgrade to 4.0.3
This commit is contained in:
@@ -437,8 +437,6 @@ class App
|
||||
/**
|
||||
* Calls a page controller by name
|
||||
* and with the given arguments
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function controller(
|
||||
string $name,
|
||||
|
@@ -391,7 +391,7 @@ class License
|
||||
*/
|
||||
public function save(): bool
|
||||
{
|
||||
if ($this->status() !== LicenseStatus::Active) {
|
||||
if ($this->status()->activatable() !== true) {
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'license.verification'
|
||||
]);
|
||||
|
@@ -43,6 +43,22 @@ enum LicenseStatus: string
|
||||
*/
|
||||
case Missing = 'missing';
|
||||
|
||||
/**
|
||||
* Checks if the license can be saved when it
|
||||
* was entered in the activation dialog;
|
||||
* renewable licenses are accepted as well
|
||||
* to allow renewal from the Panel
|
||||
*/
|
||||
public function activatable(): bool
|
||||
{
|
||||
return match ($this) {
|
||||
static::Active,
|
||||
static::Inactive,
|
||||
static::Legacy => true,
|
||||
default => false
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the dialog according to the status
|
||||
*/
|
||||
@@ -95,7 +111,7 @@ enum LicenseStatus: string
|
||||
public function renewable(): bool
|
||||
{
|
||||
return match ($this) {
|
||||
static::Demo => false,
|
||||
static::Demo,
|
||||
static::Active => false,
|
||||
default => true
|
||||
};
|
||||
|
@@ -753,6 +753,10 @@ class Environment
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Str::endsWith($host, '.ddev.site') === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// collect all possible visitor ips
|
||||
$ips = [
|
||||
$this->get('REMOTE_ADDR'),
|
||||
|
@@ -186,7 +186,7 @@ class Url
|
||||
$uri->slash = false;
|
||||
|
||||
$url = $base ? $uri->base() : $uri->toString();
|
||||
$url = str_replace('www.', '', $url);
|
||||
$url = str_replace('www.', '', $url ?? '');
|
||||
|
||||
return Str::short($url, $length, $rep);
|
||||
}
|
||||
|
Reference in New Issue
Block a user