Skip to content

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

Open
ca-morfeusz2844 wants to merge 3 commits intoweb3p:masterfrom
ca-morfeusz2844:bug/fix-01
Open

Resolve problem with mb_substr() on Laravel 9.x/10.x and PHP 8.1#318
ca-morfeusz2844 wants to merge 3 commits intoweb3p:masterfrom
ca-morfeusz2844:bug/fix-01

Conversation

@ca-morfeusz2844
Copy link

No description provided.

$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.

2 participants