mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 18:24:57 +02:00
Optimization to Page::setQuietly() method to support more direct setting of integer base properties in Page::$settings
This commit is contained in:
@@ -967,7 +967,12 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
*/
|
||||
public function setQuietly($key, $value) {
|
||||
$this->quietMode = true;
|
||||
if(isset($this->settings[$key]) && is_int($value)) {
|
||||
// allow integer-only values in $this->settings to be set directly in quiet mode
|
||||
$this->settings[$key] = $value;
|
||||
} else {
|
||||
parent::setQuietly($key, $value);
|
||||
}
|
||||
$this->quietMode = false;
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user