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

Bug in function hasObjectAttributeContent of class eZMultiOption2Type

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.1, 4.0.0rc1
    • 3.10.0, 4.0.0beta1
    • Legacy > Webshop
    • None
    • Operating System: linux
      PHP Version: 4.4.4
      Database and version: mysql 5.0.32
      Browser (and version): Firefox 2.0.0.1

    Description

      When I want to display a product containing the datatype multioption2 I get the following error:

      Fatal error: Call to a member function on a non-object in /var/www/admin.intra.mediata.com/software-source/ez-publish/GPL/ezpublish-3.10.0/kernel/classes/datatypes/ezmultioption2/ezmultioption2type.php on line 527
      Fatal error: eZ Publish did not finish its request

      This is caused by a bug in function hasObjectAttributeContent of class eZMultiOption2Type.

      Instead of

      function hasObjectAttributeContent( &$contentObjectAttribute )
          {
              $groups =& $contentObjectAttribute->content();
              $grouplist = $multioption->attribute( 'optiongroup_list' );
              return count( $grouplist ) > 0;
          }
      

      it must be

      function hasObjectAttributeContent( &$contentObjectAttribute )
          {
              $groups =& $contentObjectAttribute->content();
              $grouplist = $groups->attribute( 'optiongroup_list' );
              return count( $grouplist ) > 0;
          }
      
      Steps to reproduce

      Create a product which contains the datatype multioption2
      Try to view the product in frontend

      Attachments

        Activity

          People

            a29ca475-2ac3-469b-95ea-e37ca79eae29@accounts.ibexa.co Sergiy Pushchin
            e8c27efa-d74a-4f0f-93e7-219bc3702db7@accounts.ibexa.co Holger Marx
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: