From db5f70501a29db2590da853f0ac5a1af3764a568 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 24 Sep 2013 09:05:19 +0200 Subject: [PATCH] renamed 2 patch and add one (entity patch) --- ... AUTOCOMPLETE_select_event-365241-54.patch | 0 ...62-15-language-in-login-cancel-links.patch | 0 entity_noninterger_cleaning.patch | 23 +++++++++++++++++++ 3 files changed, 23 insertions(+) rename ac_select_event-365241-54.patch => AUTOCOMPLETE_select_event-365241-54.patch (100%) rename 1754162-15-language-in-login-cancel-links.patch => USER_1754162-15-language-in-login-cancel-links.patch (100%) create mode 100755 entity_noninterger_cleaning.patch diff --git a/ac_select_event-365241-54.patch b/AUTOCOMPLETE_select_event-365241-54.patch similarity index 100% rename from ac_select_event-365241-54.patch rename to AUTOCOMPLETE_select_event-365241-54.patch diff --git a/1754162-15-language-in-login-cancel-links.patch b/USER_1754162-15-language-in-login-cancel-links.patch similarity index 100% rename from 1754162-15-language-in-login-cancel-links.patch rename to USER_1754162-15-language-in-login-cancel-links.patch diff --git a/entity_noninterger_cleaning.patch b/entity_noninterger_cleaning.patch new file mode 100755 index 00000000..136ad749 --- /dev/null +++ b/entity_noninterger_cleaning.patch @@ -0,0 +1,23 @@ +diff --git a/includes/entity.inc b/includes/entity.inc +index 2fefd59..0b80d53 100644 +--- a/includes/entity.inc ++++ b/includes/entity.inc +@@ -159,6 +159,18 @@ class DrupalDefaultEntityController implements DrupalEntityControllerInterface { + */ + public function load($ids = array(), $conditions = array()) { + $entities = array(); ++ ++ # PATCH http://drupal.org/node/1003788#comment-5195682 ++ // Clean the $ids array to remove non-integer values that can be passed ++ // in from various sources, including menu callbacks. ++ if (is_array($ids)) { ++ foreach ($ids as $key => $id) { ++ if (empty($id) || ((string) $id !== (string) (int) $id)) { ++ unset($ids[$key]); ++ } ++ } ++ } ++ # endpatch + + // Revisions are not statically cached, and require a different query to + // other conditions, so separate the revision id into its own variable.