diff --git a/Core/FieldHandler/EzImage.php b/Core/FieldHandler/EzImage.php index 2224b4aa..f72d5e01 100644 --- a/Core/FieldHandler/EzImage.php +++ b/Core/FieldHandler/EzImage.php @@ -60,6 +60,10 @@ public function hashToFieldValue($fieldValue, array $context = array()) */ public function fieldValueToHash($fieldValue, array $context = array()) { + if ($fieldValue->uri == null) { + return null; + } + return array( 'path' => realpath($this->ioRootDir) . '/' . ($this->ioDecorator ? $this->ioDecorator->undecorate($fieldValue->uri) : $fieldValue->uri), 'filename'=> $fieldValue->fileName, diff --git a/Core/FieldHandler/EzMedia.php b/Core/FieldHandler/EzMedia.php index 2ae2281c..1b582e3a 100644 --- a/Core/FieldHandler/EzMedia.php +++ b/Core/FieldHandler/EzMedia.php @@ -100,6 +100,10 @@ public function hashToFieldValue($fieldValue, array $context = array()) */ public function fieldValueToHash($fieldValue, array $context = array()) { + if ($fieldValue->uri == null) { + return null; + } + return array( 'path' => realpath($this->ioRootDir) . '/' . ($this->ioDecorator ? $this->ioDecorator->undecorate($fieldValue->uri) : $fieldValue->uri), 'filename'=> $fieldValue->fileName, diff --git a/Core/Matcher/AbstractMatcher.php b/Core/Matcher/AbstractMatcher.php index 6e2dc641..c3fc4ab5 100644 --- a/Core/Matcher/AbstractMatcher.php +++ b/Core/Matcher/AbstractMatcher.php @@ -61,7 +61,7 @@ protected function matchAnd($conditionsArray) return $results; } - protected function matchOr(array $conditionsArray) + protected function matchOr($conditionsArray) { /// @todo introduce proper re-validation of all child conditions if (!is_array($conditionsArray) || !count($conditionsArray)) { diff --git a/WHATSNEW.md b/WHATSNEW.md index 9c73dd99..d9281b62 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -1,8 +1,22 @@ -Version 5.7.2 +Version 5.7.3 ============= * Fix: warnings due to ContentVersionMatcher methods signatures +* Fix: creating migrations for Content creation or update with contents which have empty Image/File/Media fields would + crash + +Version 5.7.2 +============= + +* An attempt at fixing php warnings that turned out to be wrong + + +Version 5.7.1 +============= + +* An attempt at fixing php warnings that turned out to be wrong + Version 5.7.0 =============