Skip to content

Commit 1338bc9

Browse files
committed
Merge pull request #49 from pstast/patch-1
preg_split() compatibility with HHVM
2 parents 71b36c5 + 623da4d commit 1338bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Html2Text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ protected function pregPreCallback(/** @noinspection PhpUnusedParameterInspectio
565565
protected function toupper($str)
566566
{
567567
// string can contain HTML tags
568-
$chunks = preg_split('/(<[^>]*>)/', $str, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
568+
$chunks = preg_split('/(<[^>]*>)/', $str, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
569569

570570
// convert toupper only the text between HTML tags
571571
foreach ($chunks as $i => $chunk) {

0 commit comments

Comments
 (0)