Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for php 8.0 #687

Merged
merged 4 commits into from
Dec 3, 2021
Merged

Fix for php 8.0 #687

merged 4 commits into from
Dec 3, 2021

Conversation

pandarek
Copy link
Contributor

@pandarek pandarek commented Dec 1, 2021

$parts must be an array, because the argument for count() must be countable, mb_split() returns an array or a boolean.

$parts must be an array, because the argument for count() must be countable, mb_split() returns an array or a boolean.
@@ -44,7 +44,8 @@ function smarty_mb_str_replace($search, $replace, $subject, &$count = 0)
}
}
} else {
$parts = mb_split(preg_quote($search), $subject);
$parts = mb_split(preg_quote($search, null), $subject);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, null seems unnecessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it can be omitted

@wisskid wisskid merged commit cd96228 into smarty-php:master Dec 3, 2021
@wisskid
Copy link
Contributor

wisskid commented Dec 3, 2021

@pandarek thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants