Projet

Général

Profil

Révision 082b75eb

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/entity/includes/entity.wrapper.inc
121 121
    if (!$this->validate($value)) {
122 122
      throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
123 123
        // An exception's message is output through check_plain().
124
        '!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
124
        '!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
125 125
        '!location' => $this->debugIdentifierLocation(),
126 126
      )));
127 127
    }
......
755 755
    if (!$this->validate($value)) {
756 756
      throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
757 757
        // An exception's message is output through check_plain().
758
        '!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
758
        '!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
759 759
        '!location' => $this->debugIdentifierLocation(),
760 760
      )));
761 761
    }
......
1116 1116
   */
1117 1117
  public function getIterator() {
1118 1118
    // In case there is no data available, just iterate over the first item.
1119
    return new EntityMetadataWrapperIterator($this, $this->dataAvailable() ? array_keys(parent::value()) : array(0));
1119
    return new EntityMetadataWrapperIterator($this, ($this->dataAvailable() && is_array(parent::value())) ? array_keys(parent::value()) : array(0));
1120 1120
  }
1121 1121

  
1122 1122
  /**

Formats disponibles : Unified diff