Warning: array_flip(): Can only flip STRING and INTEGER values!

Created on 16 April 2019, almost 7 years ago
Updated 16 October 2025, 4 months ago

This warning can happen if you pass null to EntityStorageBase->load function or a malformed array to EntityStorageBase->loadMultiple. A more helpful, intentional warning might make a better developer experience.

Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 264 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Steps to reproduce:
drush php-eval "Drupal::entityTypeManager()->getStorage('node')->loadMultiple(['x'=>['x']]);"

Feature request
Status

Closed: duplicate

Version

9.3

Component

entity system

Created by

🇹🇳Tunisia Riadh Rahmi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024