[bridges] fix invalid use of empty() for php < 5.5

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-09-01 22:53:01 +02:00
parent c642fca0d0
commit 948bd9ae31
7 changed files with 18 additions and 16 deletions

View file

@ -18,8 +18,9 @@ class CryptomeBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
or $this->returnServerError('Could not request Cryptome.');
if (!empty($this->getInput('n'))) { /* number of documents */
$num = min($this->getInput('n'), 20);
$number=$this->getInput('n');
if (!empty($number)) { /* number of documents */
$num = min($number, 20);
}