Skip to content

Commit

Permalink
[3.10] [PHP 8.1] Fix HtmlDocument preg_split(): Passing null to $limi…
Browse files Browse the repository at this point in the history
…t of type int (#36775)

Fixes `Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595`
  • Loading branch information
beat authored Jan 23, 2022
1 parent c0286f0 commit 7021322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Document/HtmlDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public function render($caching = false, $params = array())
public function countModules($condition)
{
$operators = '(\+|\-|\*|\/|==|\!=|\<\>|\<|\>|\<=|\>=|and|or|xor)';
$words = preg_split('# ' . $operators . ' #', $condition, null, PREG_SPLIT_DELIM_CAPTURE);
$words = preg_split('# ' . $operators . ' #', $condition, -1, PREG_SPLIT_DELIM_CAPTURE);

if (count($words) === 1)
{
Expand Down

0 comments on commit 7021322

Please sign in to comment.