ConsoleTVs / Profanity

PHP library to block bad words in a string
MIT License
98 stars 46 forks source link

production WARNING php 8.1 #25

Open MjeTjeu opened 1 year ago

MjeTjeu commented 1 year ago

[2023-02-23 09:11:23] production.WARNING: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in vendor/consoletvs/profanity/Classes/Blocker.php on line 135

B1Q commented 1 year ago

did you fix it?

zanderwar commented 10 months ago
if (! is_string($this->text)) {
    return [];
}

before the preg_match on 135