Upgrade to 3.9.8
This commit is contained in:
@@ -66,9 +66,11 @@ class Collection extends BaseCollection
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal setter for each object in the Collection.
|
||||
* This takes care of Component validation and of setting
|
||||
* the collection prop on each object correctly.
|
||||
* Internal setter for each object in the Collection;
|
||||
* override from the Toolkit Collection is needed to
|
||||
* make the CMS collections case-sensitive;
|
||||
* child classes can override it again to add validation
|
||||
* and custom behavior depending on the object type
|
||||
*
|
||||
* @param string $id
|
||||
* @param object $object
|
||||
@@ -79,6 +81,16 @@ class Collection extends BaseCollection
|
||||
$this->data[$id] = $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal remover for each object in the Collection;
|
||||
* override from the Toolkit Collection is needed to
|
||||
* make the CMS collections case-sensitive
|
||||
*/
|
||||
public function __unset($id)
|
||||
{
|
||||
unset($this->data[$id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a single object or
|
||||
* an entire second collection to the
|
||||
|
||||
@@ -207,7 +207,7 @@ class FileRules
|
||||
if (
|
||||
Str::contains($extension, 'php') !== false ||
|
||||
Str::contains($extension, 'phar') !== false ||
|
||||
Str::contains($extension, 'phtml') !== false
|
||||
Str::contains($extension, 'pht') !== false
|
||||
) {
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'file.type.forbidden',
|
||||
|
||||
@@ -206,6 +206,20 @@ class UpdateStatus
|
||||
];
|
||||
}
|
||||
|
||||
// add special message for end-of-life PHP versions
|
||||
$phpMajor = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;
|
||||
$phpEol = $this->data['php'][$phpMajor] ?? null;
|
||||
if (is_string($phpEol) === true && $eolTime = strtotime($phpEol)) {
|
||||
// the timestamp is available and valid, now check if it is in the past
|
||||
if ($eolTime < time()) {
|
||||
$messages[] = [
|
||||
'text' => I18n::template('system.issues.eol.php', null, ['release' => $phpMajor]),
|
||||
'link' => 'https://getkirby.com/security/php-end-of-life',
|
||||
'icon' => 'bell'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->messages = $messages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user