Problem/Motivation

( ! ) Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/web/modules/contrib/pathauto/src/PathautoGenerator.php on line 325

This seems to happen because when creating a new node $entity->id() is NULL when caching the pattern.

Not sure if it's worth caching in this case so I adjusted it to return the pattern directly.

CommentFileSizeAuthor
#6 pathauto-php85-3576435.patch589 bytesjamesoakley

Issue fork pathauto-3576435

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

hydra created an issue. See original summary.

hydra’s picture

Status: Active » Needs review
jamesoakley’s picture

Status: Needs review » Reviewed & tested by the community

I've tested a site with the same error, and applying your MR solved the problem.

mably’s picture

Assigned: hydra » berdir
jamesoakley’s picture

StatusFileSize
new589 bytes

Here's a patch, not to apply to the current HEAD, because it won't apply and the merge request works (hence this is RTBC).

This will patch released 8.x-1.14 to resolve the problem with PHP 8.5, so that site builders don't have to move over to -dev (which has quite a few other commits since 8.x-1.14) just to get this one fix. It's a patch to fix this until we have a stable release of pathauto that includes the full solution

mably’s picture

We’re hoping to have a new release out soon 🤞

berdir’s picture

Assigned: berdir » Unassigned

Fine to return early here.

  • mably committed 2f4cee13 on 8.x-1.x authored by hydra
    task: #3576435 PHP 8.5 deprecation
    
    By: hydra
    By: jamesoakley
    By: mably...
mably’s picture

Status: Reviewed & tested by the community » Fixed

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.

Status: Fixed » Closed (fixed)

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