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

has_content of an eZInteger attribute is always true

    XMLWordPrintable

Details

    Description

      the hasObjectAttribute() of the ezinteger datatype always returns true, even there is no content, this method should probably be something like

          function hasObjectAttributeContent( $contentObjectAttribute )
          {
              // return true;
              return !is_null( $contentObjectAttribute->attribute( 'data_int' ) );
          }
      
      Steps to reproduce

      1. create a content class with an ezinteger attribute
      2. set no default value
      3. create an instance of this class without content in the ezinteger attribute
      4. create a template for this class an put something like

      {if $node.data_map.integer_attr.has_content}
      ezinteger has content ? yes ({$node.data_map.integer_attr.content}) but no !
      {/if}
      

      5. the text is always shown

      Attachments

        Activity

          People

            nfrp nfrp
            dpobel dpobel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: