You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered a specific edge case when the input text is empty.
This is on php 8.2 on FreeBSD 14.1
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in ./vendor/erusev/parsedown/Parsedown.php on line 43
Due to the fact that the input text is immediately used to call to protected function textElements, there will be at least a deprecated warning throw out by str_replace php function.
As a temporary workaround, I have inserted on line 26, as the first line of code in function text($text), the next one-liner snippet and moved anything else down: if (strlen($text) == 0) return "";
Hope this will help somebody.
The text was updated successfully, but these errors were encountered:
Hello,
I have encountered a specific edge case when the input text is empty.
This is on php 8.2 on FreeBSD 14.1
Due to the fact that the input text is immediately used to call to protected function textElements, there will be at least a deprecated warning throw out by str_replace php function.
As a temporary workaround, I have inserted on line 26, as the first line of code in function text($text), the next one-liner snippet and moved anything else down:
if (strlen($text) == 0) return "";
Hope this will help somebody.
The text was updated successfully, but these errors were encountered: