diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 78982a8..87e60b9 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -1010,13 +1010,9 @@ public function __set($name, $value) { * Implements the magic method for isset(). */ public function __isset($name) { - // "Official" Field API fields are always set. - if ($this->hasField($name)) { - return TRUE; - } - - // For non-field properties, check the internal values. - return isset($this->values[$name]); + // "Official" Field API fields are always set. For non-field properties, + // check the internal values. + return $this->hasField($name) ? TRUE : isset($this->values[$name]); } /** @@ -1026,7 +1022,7 @@ public function __unset($name) { // Unsetting a field means emptying it. if ($this->hasField($name)) { $this->get($name)->setValue(array()); - return TRUE; + return; } // For non-field properties, unset the internal value. @@ -1067,7 +1063,7 @@ public function __clone() { // Avoid deep-cloning when we are initializing a translation object, since // it will represent the same entity, only with a different active language. if ($this->translationInitialize) { - return TRUE; + return; } // The translation is a different object, and needs its own TypedData