diff --git a/src/Extractor/TikaServerTextExtractor.php b/src/Extractor/TikaServerTextExtractor.php index c6bcfbf..28ca93a 100644 --- a/src/Extractor/TikaServerTextExtractor.php +++ b/src/Extractor/TikaServerTextExtractor.php @@ -129,7 +129,7 @@ class TikaServerTextExtractor extends FileTextExtractor $tempFile = $file instanceof File ? $this->getPathFromFile($file) : $file; $content = $this->getClient()->tika($tempFile); //Cleanup temp file - if ($tempFile instanceof File) { + if ($file instanceof File) { unlink($tempFile); } return $content; diff --git a/src/Extractor/TikaTextExtractor.php b/src/Extractor/TikaTextExtractor.php index 345e093..5568351 100644 --- a/src/Extractor/TikaTextExtractor.php +++ b/src/Extractor/TikaTextExtractor.php @@ -81,7 +81,7 @@ class TikaTextExtractor extends FileTextExtractor $command = sprintf('tika %s %s', $mode, escapeshellarg($path)); $code = $this->runShell($command, $output); //Cleanup temp file - if ($path instanceof File) { + if ($file instanceof File) { unlink($path); }