1
0
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:
Ryan Cramer
2016-12-03 07:55:08 -05:00
parent ac9487e967
commit 423fbe6f57
2 changed files with 2 additions and 3 deletions

View File

@@ -876,8 +876,6 @@ $config->dbSqlModes = array(
/**
* A key=>value array of any additional driver-specific connection options.
*
* This is the
*
* @var array
*
*/

View File

@@ -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);