Merge pull request #49 from emteknetnz/availabe-version-fix-v2

Change the tika requirement from 1.7.0 to 1.7
This commit is contained in:
Robbie Averill 2018-07-11 17:04:57 +12:00 committed by GitHub
commit 351d71bcdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -70,9 +70,12 @@ class TikaServerTextExtractor extends FileTextExtractor
public function isAvailable()
{
// check for version 1.7 instead of 1.7.0, because if server returns 1.7
// then version_compare('1.7', '1.7.0') == -1 which is incorrect
// however, if server returns 1.7.0 then version_compare('1.7.0', '1.7') == 1 which is ok
return $this->getServerEndpoint() &&
$this->getClient()->isAvailable() &&
version_compare($this->getVersion(), '1.7.0') >= 0;
version_compare($this->getVersion(), '1.7') >= 0;
}
public function supportsExtension($extension)