Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Html2Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function convert(string $html, $options = []): string {

// check all options are valid
foreach ($options as $key => $value) {
if (!in_array($key, array_keys(static::defaultOptions()))) {
if (!array_key_exists($key, static::defaultOptions())) {
throw new \InvalidArgumentException("Unknown html2text option '$key'. Valid options are " . implode(',', static::defaultOptions()));
}
}
Expand Down