Problem/Motivation

The following error is displayed when visiting /node/add:

TypeError: eck_site_settings_entity_create_access(): Argument #3 ($entity_bundle) must be of type ?string, int given

Steps to reproduce

Create a 404 node type and visit /node/add in an anonymous session. Add a hook_entity_create_access implementation that typehints the $entity_bundle argument as string.

Proposed resolution

The phpdoc of hook_entity_create_access indicates that the $entity_bundle argument should be a string, so let's make sure it's casted to a string before being passed to implementations.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3487235

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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review
smustgrave’s picture

Version: 11.1.x-dev » 11.x-dev
Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests

Thanks for reporting

Believe test steps would be to get a test case showing the issue.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.