PHP 8.3 (required for Drupal 11).

Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\taxonomy_menu\Entity\TaxonomyMenu->buildMenuDefinition() (line 274 of taxonomy_menu/src/Entity/TaxonomyMenu.php)

CommentFileSizeAuthor
#6 taxonomy_menu-n3496390-6.patch756 bytesdamienmckenna

Comments

trobey created an issue. See original summary.

kalash-j’s picture

Assigned: Unassigned » kalash-j
damienmckenna’s picture

Version: 8.x-3.6 » 8.x-3.x-dev
Status: Active » Postponed (maintainer needs more info)
Related issues: +#3413255: Change Testing to GitLab CI

Please see if the current dev release fixes this, some minor changes were committed in #3413255: Change Testing to GitLab CI that might affect this.

brooke_heaton’s picture

Just chiming in to say that I'm getting this error as well on the current Dev version and Core Version 10.2.0. I haven't dug in to investigate yet but will try to identify the problem. But just noting that unfortunately the latest changes on Dev do not seem to resolve this issue.

brooke_heaton’s picture

Seems the issue may be a new setting missing. I went in to each menu and resaved the form and the issue goes away.

damienmckenna’s picture

Title: Deprecated function » Deprecated function str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in TaxonomyMenu->buildMenuDefinition
Assigned: kalash-j » Unassigned
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new756 bytes

This happens because $this->getMenuParent() returns NULL instead of a string.

Does this help?

jannakha’s picture

Status: Needs review » Reviewed & tested by the community

works now on php 8.3
thanks for the patch

damienmckenna’s picture

Thanks for the review.

  • damienmckenna committed 2b144786 on 8.x-3.x
    Issue #3496390 by trobey, damienmckenna, brooke_heaton, jannakha:...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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