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

Undefined variable: result in ezcontentfunctioncollection.php on line 389 when as_object = false

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.0.0beta1
    • 4.0.0alpha2
    • Misc
    • None

    Description

      Undefined variable: result in kernel/content/ezcontentfunctioncollection.php on line 389
      when as_object = false

      3.10 code

              if ( $children === null )
              {
                  $result = array( 'error' => array( 'error_type' => 'kernel',
                                                     'error_code' => EZ_ERROR_KERNEL_NOT_FOUND ) );
              }
              else
              {
                  $result = array( 'result' => &$children );
              }
              return $result;
      

      4.0 code

              if ( $asObject === null or $asObject )
              {
                  $result = array( 'result' => $children );
              }
      
              return $result;
      

      Proposed code:

              if ( $children === null )
              {
                  $result = array( 'error' => array( 'error_type' => 'kernel',
                                                     'error_code' => EZ_ERROR_KERNEL_NOT_FOUND ) );
              }
              else
              {
                  $result = array( 'result' => $children );
              }
              return $result;
      

      Attachments

        Activity

          People

            sa sa
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: