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

Support untuk PHP 8.1 #466

Open
ahmadfadlydziljalal opened this issue Sep 7, 2022 · 1 comment
Open

Support untuk PHP 8.1 #466

ahmadfadlydziljalal opened this issue Sep 7, 2022 · 1 comment

Comments

@ahmadfadlydziljalal
Copy link

Dear Cak,
PHP versi 8.1.5
Yii 2.0.46

Untuk route: /admin/permission/index dengan

Halaman gagal render karena :

PHP Deprecated Warning – yii\base\ErrorException
trim(): Passing null to parameter #1 ($string) of type string is deprecated

@madeep
Copy link

madeep commented Sep 12, 2022

Hi,
it's not compliant but you can bypass the problem by update search/models/AuthItem on line 79:
replace this code:
$search = mb_strtolower(trim($this->name));
$desc = mb_strtolower(trim($this->description));

to

if (null !== $this->name && trim($this->name) != '') {
$search = mb_strtolower(trim($this->name));
}
if (null !== $this->description && trim($this->description) != '') {
$desc = mb_strtolower(trim($this->description));
}

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

No branches or pull requests

2 participants