Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-11075

eZContentClassAttribute::fetchListByClassID does not work when asObject is set to false

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 3.9.2
    • Misc
    • None

    Description

      If asObject is set to false, $objectItem won't be an object.

      static function &fetchListByClassID( $classID, $version = EZ_CLASS_VERSION_STATUS_DEFINED, $asObject = true )
      {
      $objects = null;
      if ( $asObject )

      { $objects =& $GLOBALS['eZContentClassAttributeCacheList'][$classID][$version]; }

      if ( !isset( $objects ) or
      $objects === null )
      {
      $cond = array( 'contentclass_id' => $classID,
      'version' => $version );
      $objectList = eZPersistentObject::fetchObjectList( eZContentClassAttribute::definition(),
      null, $cond, null, null,
      $asObject );
      foreach ( array_keys( $objectList ) as $objectKey )

      { $objectItem =& $objectList[$objectKey]; $objectID = $objectItem->ID; $objectVersion = $objectItem->Version; if ( !isset( $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] ) ) $GLOBALS['eZContentClassAttributeCache'][$objectID][$objectVersion] =& $objectItem; }

      $objects = $objectList;
      }
      return $objects;
      }

      Attachments

        Activity

          People

            unknown unknown
            ab@ez.no ab@ez.no
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: