mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Fix issue in Page.php formatFieldValue function that occurs when formatting a single image|null field.
This commit is contained in:
@@ -876,8 +876,6 @@ $config->dbSqlModes = array(
|
||||
/**
|
||||
* A key=>value array of any additional driver-specific connection options.
|
||||
*
|
||||
* This is the
|
||||
*
|
||||
* @var array
|
||||
*
|
||||
*/
|
||||
|
@@ -1300,8 +1300,9 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
if($this->outputFormatting) {
|
||||
// output formatting is enabled so return a formatted value
|
||||
$value = $field->type->formatValue($this, $field, $value);
|
||||
// check again for interface since value may now be different
|
||||
if($hasInterface) $hasInterface = is_object($value) && $value instanceof PageFieldValueInterface;
|
||||
if($hasInterface) $value->formatted(true);
|
||||
|
||||
} else if($hasInterface && $value->formatted()) {
|
||||
// unformatted requested, and value is already formatted so load a fresh copy
|
||||
$this->__unset($field->name);
|
||||
|
Reference in New Issue
Block a user