From 9cede2c458d3c8d40d1851deb736da6fe7ae2339 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Sat, 23 Nov 2024 14:28:07 +0100 Subject: [PATCH] Custom Fields: Trigger deprecation on non-numeric item-ID --- .../components/com_fields/src/Model/FieldModel.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/administrator/components/com_fields/src/Model/FieldModel.php b/administrator/components/com_fields/src/Model/FieldModel.php index 1b8031d1042b7..d21983578d4df 100644 --- a/administrator/components/com_fields/src/Model/FieldModel.php +++ b/administrator/components/com_fields/src/Model/FieldModel.php @@ -617,6 +617,13 @@ public function setFieldValue($fieldId, $itemId, $value) return false; } + if (!is_numeric($itemId)) { + @trigger_error( + 'Using non-numeric IDs for content items for custom fields is deprecated. Convert your extension to only use numeric IDs.', + E_USER_DEPRECATED + ); + } + $needsDelete = false; $needsInsert = false; $needsUpdate = false;