The expression $save of type false|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== false instead.
In PHP, under loose comparison (like ==, or !=, or switch conditions),
values of different types might be equal.
For string values, the empty string '' is a special case, in particular
the following results might be unexpected:
''==false// true''==null// true'ab'==false// false'ab'==null// false// It is often better to use strict comparison''===false// false''===null// false
Loading history...
47
$result = $this->finder->getContent($save);
48
}
49
50
return $result;
51
}
52
53
/**
54
* @param string $dataset
55
* @param string $format
56
* @param string $filter
57
* @return false|string
58
*/
59
public function findDownload($dataset, $format, $filter = null)
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: