mirror of
https://github.com/processwire/processwire.git
synced 2025-08-21 14:02:59 +02:00
Fix issue processwire/processwire-issues#319 where Page::setAndSave() was only working with custom fields and not with DB native properties
This commit is contained in:
@@ -2369,6 +2369,9 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
if(!is_null($field)) {
|
||||
if($this->hasField($field)) {
|
||||
return $this->wire('pages')->saveField($this, $field, $options);
|
||||
} else if(is_string($field) && (isset($this->settings[$field]) || parent::get($field) !== null)) {
|
||||
$options['noFields'] = true;
|
||||
return $this->wire('pages')->save($this, $options);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user