Browse Source

Merge branch 'master' of dimti.ru:lib/Image

master
Alexander Demidov 11 years ago
parent
commit
2c3211565a
  1. 9
      Upload.class.php

9
Upload.class.php

@ -129,11 +129,12 @@ abstract class Upload
. $pil_options . $pil_options
. ' ' . $tmp_file_path . ' ' . $tmp_file_path
. ' ' . $file_path; . ' ' . $file_path;
passthru( $command, $code );
ob_start();
passthru( 'exec 2>&1; ' . $command, $code );
if ($code !== 0) { 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 { } else {
if ($width || $height) { if ($width || $height) {
if (!(ImageVariant::getIsClass($image)) && Image::getIsSubClass($image)) { if (!(ImageVariant::getIsClass($image)) && Image::getIsSubClass($image)) {
@ -175,4 +176,4 @@ abstract class Upload
} }
} }
} }
}
}
Loading…
Cancel
Save