Merge branch '2.1' into 2

This commit is contained in:
Robbie Averill 2019-04-12 15:02:09 +12:00
commit 944cabb805

View File

@ -70,9 +70,12 @@ class TikaServerTextExtractor extends FileTextExtractor
public function isAvailable() 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() && return $this->getServerEndpoint() &&
$this->getClient()->isAvailable() && $this->getClient()->isAvailable() &&
version_compare($this->getVersion(), '1.7.0') >= 0; version_compare($this->getVersion(), '1.7') >= 0;
} }
public function supportsExtension($extension) public function supportsExtension($extension)