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

eZURLAliasML::setAttribute calls a non-static method on eZPersistentObject class

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Medium Medium
    • Customer request
    • 4.0.1
    • Misc
    • None

    Description

      eZURLAliasML::setAttribute calls a non-static method on eZPersistentObject class.

      ezp401/kernel/classes/ezurlaliasml.php:

          /*!
           Overrides the default behaviour to automatically update TextMD5.
           */
          function setAttribute( $name, $value )
          {
              eZPersistentObject::setAttribute( $name, $value );
              if ( $name == 'text' )
              {
                  $this->TextMD5 = md5( eZURLALiasML::strtolower( $value ) );
              }
              else if ( $name == 'action' )
              {
                  $this->ActionType = null;
              }
          }
      

      ezp401/kernel/classes/ezpersistentobject.php:

          /*!
           Sets the attribute \a $attr to the value \a $val. The attribute must be present in the
           objects definition fields or set functions.
          */
          function setAttribute( $attr, $val )
          {
              $def = $this->definition();
      *snip*
      

      1. the method is not defined as STATIC
      2. the method calls methods on "$this" multiple times, probably why it is not STATIC

      Steps to reproduce

      just spotted the issue in the code. have not done any testing, so I am unsure of the consequences. perhaps OMS would know more.

      Attachments

        Activity

          People

            unknown unknown
            jkn jkn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: