ob_start, ob_clean при запуске процесса pil

This commit is contained in:
2014-05-30 20:00:01 +04:00
parent e905878644
commit 802d4bcf08

View File

@ -124,12 +124,12 @@ abstract class Upload
. $pil_options . $pil_options
. ' ' . $tmp_file_path . ' ' . $tmp_file_path
. ' ' . $file_path; . ' ' . $file_path;
//ob_start(); ob_start();
passthru( 'exec 2>&1; ' . $command, $code ); passthru( 'exec 2>&1; ' . $command, $code );
if ($code !== 0) { if ($code !== 0) {
throw new ErrorException('Command PYTHON_PIL_RESIZE exit with code "' . $code . '": ' . $command . PHP_EOL . 'Std out: ' . ob_get_clean() ); throw new ErrorException('Command PYTHON_PIL_RESIZE exit with code "' . $code . '": ' . $command . PHP_EOL . 'Std out: ' . ob_get_clean() );
} }
// ob_clean(); ob_clean();
} else { } else {
if ($width || $height) { if ($width || $height) {
if (!(ImageVariant::getIsClass($image)) && Image::getIsSubClass($image)) { if (!(ImageVariant::getIsClass($image)) && Image::getIsSubClass($image)) {