mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
execWithTimeout() fails if cmd returns something in stderr
This commit is contained in:
parent
5a96788ccc
commit
0affcd93e7
|
@ -159,6 +159,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase {
|
|||
/* %s was just added because the commands to convert to text/plain used
|
||||
* it instead of %f for the input file
|
||||
* %f = input file
|
||||
* %if = format (jpg, png, pdf, gif)
|
||||
* %o = output file
|
||||
* %m = mime type
|
||||
* %w = width
|
||||
|
@ -175,6 +176,12 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
if(!empty($ret['stderr'])) {
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with cmd "'.$this->cmd.'" failed: '.$ret['stderr'], PEAR_LOG_ERR);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
$end = microtime(true);
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with cmd "'.$this->cmd.'" took '.($end-$start).' sec.', PEAR_LOG_DEBUG);
|
||||
|
|
Loading…
Reference in New Issue
Block a user