From 9aeff1a2884f7c83facff8d48c65bec2f82e344c Mon Sep 17 00:00:00 2001 From: laryn Date: Wed, 4 Feb 2026 16:39:43 -0500 Subject: [PATCH] Defensive coding in entity_plus_entity_info_alter(). --- entity_plus.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entity_plus.module b/entity_plus.module index 816f215..cc1bec1 100644 --- a/entity_plus.module +++ b/entity_plus.module @@ -277,7 +277,7 @@ function entity_plus_entity_info_alter(&$entity_plus_info) { $entity_plus_info[$type]['configuration'] = !empty($info['exportable']); } - if (isset($info['controller class']) && in_array('EntityPlusControllerInterface', class_implements($info['controller class']))) { + if (isset($info['controller class']) && in_array('EntityPlusControllerInterface', class_implements($info['controller class']) ?? [])) { // Automatically disable field cache when entity cache is used. if (!empty($info['entity cache'])) { $entity_plus_info[$type]['field cache'] = FALSE; @@ -1209,9 +1209,9 @@ function entity_plus_modules_disabled($modules) { /** * Helper for using i18n_string(). - * - * For backward compatibility, this function (which can be called even if - * i18n_string is not enabled) is kept in this module rather than in the new + * + * For backward compatibility, this function (which can be called even if + * i18n_string is not enabled) is kept in this module rather than in the new * submodule entity_plus_i18n. * * @param $name