Skip to content

Conversation

@amieiro
Copy link
Member

@amieiro amieiro commented Sep 29, 2023

Problem

Using PHP8.2, with a non logged user, when I access to a list of projects, I get a deprecation notice:

PHP Deprecated: ctype_digit(): Argument of type null will be interpreted as string in the future in /wordpress/glotpress/wp-content/plugins/GlotPress/gp-includes/thing.php on line 644

image

Solution

Since PHP 8.1.0, passing a non-string argument to the ctype_digit function is deprecated. More info here.

This PR checks if the argument passed to ctype_digit is not null, avoiding its execution in this situation.

@amieiro amieiro requested review from akirk and trymebytes September 29, 2023 16:39
@amieiro amieiro added the php Pull requests that update Php code label Sep 30, 2023
@amieiro amieiro merged commit f505ecc into GlotPress:develop Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants