Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.6, 4.1.3, 4.2.0alpha1, 4.2.0beta1, 4.2.0rc1, 4.2.0rc2
-
None
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();