Redirect stderr out to stdout with use pil.

This commit is contained in:
Alexander Demidov
2014-05-30 16:13:28 +04:00
parent adb5bd1269
commit e905878644

View File

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