PHP 8.5 deprecates non-canonical cast aliases. (integer) must be replaced with (int).

In GeofieldGoogleMapFormatter, two occurrences of (integer) !empty(...) trigger a deprecation warning at parse time:

Deprecated function: Non-canonical cast (integer) is deprecated, use the (int) cast instead

The (integer) cast is applied to the result of !empty(), which already returns a boolean. The cast is unnecessary and can simply be removed.

  • Line 330: ternary condition in settingsForm()
  • Line 793: if condition in viewElements()
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

itamair made their first commit to this issue’s fork.

  • itamair committed 49e88709 on 11.1.x authored by mably
    task: #3578833 Remove deprecated (integer) cast for PHP 8.5...
itamair’s picture

Status: Needs review » Fixed

thanks @mably, just merged into 11.1.x branch ...

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably’s picture

You're welcome :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.