htmly icon indicating copy to clipboard operation
htmly copied to clipboard

Adjusted doStrikethrough preg_split

Open PugTechnology opened this issue 3 years ago • 3 comments

[21-Jun-2022 10:10:04 America/Denver] PHP Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in C:\Server\html\system\vendor\michelf\php-markdown\Michelf\MarkdownExtra.php on line 1901

In PHP 8.1, preg_split handling null was deprecated. I changed null to 0 to resolve the php_error.

PugTechnology avatar Jun 21 '22 16:06 PugTechnology

First pull request I have posted, so lay it down on me if I am doing it wrong.

PugTechnology avatar Jun 21 '22 16:06 PugTechnology

I recommend to use -1 instead of 0 in place of null, so that it is more clearly shown that there are no limit (although -1 and 0 actually have the exact same meaning).

Reference: https://www.drupal.org/project/drupal/issues/3239294#comment-14236228

win98se avatar Jun 23 '22 02:06 win98se

Thank you! That does make sense to see it as a no limit versus looking like a value.

PugTechnology avatar Jun 27 '22 16:06 PugTechnology