Permalink
Browse files

Temporary disable exception id ExitCode < 1 as Exiftool returns -1 wh…

  • Loading branch information...
romainneutron committed Jun 12, 2012
1 parent f0a14a2 commit a82594313de311c6259fcdb140df1becbffe7830
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/PHPExiftool/Exiftool.php
@@ -29,7 +29,13 @@ protected static function executeCommand($command)
$process->run();
if ( ! $process->isSuccessful()) {
- throw new Exception\RuntimeException(sprintf('Command %s failed : %s, exitcode %s', $command, $process->getErrorOutput(), $process->getExitCode()));
+ /**
+ * Temporary disable exception id ExitCode < 1
+ * Exiftool returns -1 when run in a sub-subprocess
+ */
+ if ($process->getExitCode() > 0) {
+ throw new Exception\RuntimeException(sprintf('Command %s failed : %s, exitcode %s', $command, $process->getErrorOutput(), $process->getExitCode()));
+ }
}
return $process->getOutput();

0 comments on commit a825943

Please sign in to comment.