Skip to content

PHP 8.5 Deprecated function: Non-canonical cast (boolean) #56

Description

@izmeez

While exploring a problem on a site with other contrib modules I was seeing the error:

Deprecated function: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in include_once() (line 1600 of core/includes/bootstrap.inc).

I was able to identify the specific module that gave rise to the problem.

Also, during my search I found that commerce potentially has the same problem in

return (boolean) $this->entity->status;

The fix may be to simply replace "return (boolean)" with "return (bool)". I have not tested this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions