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

eZTemplateDesignResource::handleResource() may cause memory leaks

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • None
    • 4.0.7, 4.1.4, 4.2.0, 4.3.0, 4.4.0, 4.5.0alpha
    • Misc
    • None

    Description

      object property "KeyStack" is a stack initialized in the constructor of the eZTemplateDesignResource class.
      It is aimed to backup the content of $this->Keys which needs to correspond to the current design being processed by the handleResource() method of the same class.
      The backup happens in the early phase of handleResource() and the restore just before the final "return".

      There is a case where the element is not unstacked:

          if ( !isset( $match ) or $match === null )
              return false;
      

      This case happens when $match is not set which is when $GLOBALS['eZOverrideTemplateCacheMap'] is set but not $GLOBALS['eZOverrideTemplateCacheMap'][md5( '/' . $path )]:

          if ( isset( $GLOBALS['eZOverrideTemplateCacheMap'] ) )
          {
              if( isset( $GLOBALS['eZOverrideTemplateCacheMap'][md5( '/' . $path )] ) )
              {
      

      Using ezflow, it happens with the following value of $path (I haven't digged further here):

      1. content/datatype/view/plain/ezsrrating.tpl
      2. content/datatype/view/plain.tpl

      Attachments

        Activity

          People

            e8318ba6-e4ae-477c-9116-36c073bd11a3@accounts.ibexa.co Patrick Allaert
            e8318ba6-e4ae-477c-9116-36c073bd11a3@accounts.ibexa.co Patrick Allaert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: