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

Bug with eZHTTPTool::getDataByURL and output buffering

    XMLWordPrintable

    Details

      Description

      In eZHTTPTool::getDataByURL there is a weird behaviour if the CURL session fails.

      The outpout buffers are not flushed at all.

      The problematic code is available here :

      The following code

                  // Getting data
                  ob_start();
                  if ( !curl_exec( $ch ) )
                      return false;
      
                  curl_close ( $ch );
                  $data = ob_get_contents();
                  ob_end_clean();
      

      Should be

                  ob_start();
                  if ( !curl_exec( $ch ) )
                  {
                      curl_class( $ch );
                      ob_end_clean();
                      return false;
                  }
      
                  curl_close ( $ch );
                  $data = ob_get_contents();
                  ob_end_clean();
      

        Attachments

          Activity

            People

            Assignee:
            gl (inactive) Gunnstein Lye
            Reporter:
            gl (inactive) Gunnstein Lye
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: