Skip to content

Commit 7021322

Browse files
authored
[3.10] [PHP 8.1] Fix HtmlDocument preg_split(): Passing null to $limit of type int (joomla#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`
1 parent c0286f0 commit 7021322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/src/Document/HtmlDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ public function render($caching = false, $params = array())
592592
public function countModules($condition)
593593
{
594594
$operators = '(\+|\-|\*|\/|==|\!=|\<\>|\<|\>|\<=|\>=|and|or|xor)';
595-
$words = preg_split('# ' . $operators . ' #', $condition, null, PREG_SPLIT_DELIM_CAPTURE);
595+
$words = preg_split('# ' . $operators . ' #', $condition, -1, PREG_SPLIT_DELIM_CAPTURE);
596596

597597
if (count($words) === 1)
598598
{

0 commit comments

Comments
 (0)