Skip to content

Commit b86c1d3

Browse files
tfedorpaquettg
authored andcommitted
Fix option existence check
1 parent edec82b commit b86c1d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPHtmlParser/Options.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public function __get($key)
8080
public function setOptions(array $options): Options
8181
{
8282
foreach ($options as $key => $option) {
83-
if (!isset($this->defaults[$key])) {
84-
throw new UnknownOptionException("Option '$option' is not recognized");
83+
if (!array_key_exists($key, $this->defaults)) {
84+
throw new UnknownOptionException("Option '$key' is not recognized");
8585
}
8686
$this->options[$key] = $option;
8787
}

0 commit comments

Comments
 (0)