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

Bug casting in /lib/eztemplate/classes/eztemplate.php

    XMLWordPrintable

Details

    Description

      Around line 1746 in function appendDebugNodes( &$root, &$resourceData ), at the test:

      if ( isset( $root[1][0][2] ) && strpos( $root[1][0][2], '<!DOCTYPE' ) === 0 )
                  return;
      

      $root[1][0][2] is not all the time a string, and it troughs a warning when it's not.
      In my case, I have a template beginning with:

      {ezscript_require( 'dmv_form.js' )}
      

      As a result $root[1][0][2] is an array here (the array decdecomposition of this ez template code I guess)

      => a fix would be to check the type of $root[1][0][2], or hide notice with @strpos

      Should be something like this:

      if ( isset( $root[1][0][2] ) && gettype( $root[1][0][2] ) == "string" && strpos( $root[1][0][2], '<!DOCTYPE' ) === 0 )
                  return;
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: