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

Resolve problem with mb_substr() on Laravel 9.x/10.x and PHP 8.1 #318

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ca-morfeusz2844
Copy link

No description provided.

@@ -262,7 +262,7 @@ public function decode($value, $offset, $name)
$dynamicOffset = (int) Utils::toBn('0x' . mb_substr($value, $offset * 2, 64))->toString();
$length = (int) Utils::toBn('0x' . mb_substr($value, $dynamicOffset * 2, 64))->toString();
$roundedLength = floor(($length + 31) / 32);
$param = mb_substr($value, $dynamicOffset * 2, ( 1 + $roundedLength) * 64);
$param = mb_substr($value, $dynamicOffset * 2, (int)(( 1 + $roundedLength) * 64));
Copy link
Member

Choose a reason for hiding this comment

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

@ca-morfeusz2844 Thanks for your contribution. Is there any test case for this?

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.

None yet

2 participants