mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 16:54:44 +02:00
Update PageValues class to call $page->getField() rather than $this->getField() since it may be overridden by descending Page object (RepeaterMatrixPage for example)
This commit is contained in:
@@ -879,7 +879,7 @@ class PageValues extends Wire {
|
|||||||
$template = $page->template();
|
$template = $page->template();
|
||||||
if(!$template) return $page->_parentGet($key);
|
if(!$template) return $page->_parentGet($key);
|
||||||
|
|
||||||
$field = $this->getField($page, $key);
|
$field = $page->getField($key);
|
||||||
$value = $page->_parentGet($key);
|
$value = $page->_parentGet($key);
|
||||||
|
|
||||||
if(!$field) return $value; // likely a runtime field, not part of our data
|
if(!$field) return $value; // likely a runtime field, not part of our data
|
||||||
@@ -1047,7 +1047,7 @@ class PageValues extends Wire {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if the given key resolves to a Field or not
|
// check if the given key resolves to a Field or not
|
||||||
$field = $this->getField($page, $key);
|
$field = $page->getField($key);
|
||||||
if(!$field) {
|
if(!$field) {
|
||||||
// not a known/saveable field, let them use it for runtime storage
|
// not a known/saveable field, let them use it for runtime storage
|
||||||
$valPrevious = $page->_parentGet($key);
|
$valPrevious = $page->_parentGet($key);
|
||||||
|
Reference in New Issue
Block a user