Skip to content

Commit 61308e9

Browse files
committed
Compare filter_var with false
1 parent a474692 commit 61308e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SearchEngines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function add(string $name, string $url) : static
116116
*/
117117
public function setEngine(string $name, string $url) : static
118118
{
119-
if (!\filter_var($url, \FILTER_VALIDATE_URL)) {
119+
if (\filter_var($url, \FILTER_VALIDATE_URL) === false) {
120120
throw new InvalidArgumentException('Invalid URL: ' . $url);
121121
}
122122
$this->engines[$name] = $url;

0 commit comments

Comments
 (0)