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

[BUG] Creating captcha in PHP 8.0 #6215

Open
sunuazizrahayu opened this issue May 24, 2023 · 3 comments
Open

[BUG] Creating captcha in PHP 8.0 #6215

sunuazizrahayu opened this issue May 24, 2023 · 3 comments

Comments

@sunuazizrahayu
Copy link

Screenshot_2023-05-24_14-20-39

data type causing this

@gxgpet
Copy link
Contributor

gxgpet commented Jun 5, 2023

There's nothing on that line... Most probably you don't have the latest version of the framework.

Can you please provide the contents of that line from your CodeIgniter installation? What's causing this?

@sunuazizrahayu
Copy link
Author

There's nothing on that line... Most probably you don't have the latest version of the framework.

Can you please provide the contents of that line from your CodeIgniter installation? What's causing this?

it might have patched. i use 3.1.13

@privatecore
Copy link

@sunuazizrahayu
https://github.com/bcit-ci/CodeIgniter/blob/3.1-stable/system/helpers/captcha_helper.php#L125

replace if statement with:

if (in_array(substr($filename, -4), array('.jpg', '.png'))
	&& (intval(str_replace(array('.jpg', '.png'), '', $filename)) + $expiration) < $now)
{
	@unlink($img_path.$filename);
}

this error occurs in the php8 when you're trying to add string to integer

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

3 participants