Removing some patches.

This commit is contained in:
calcu1on 2025-09-01 21:03:55 -04:00
parent 5822c1bd45
commit b4f3df8b8a
2 changed files with 0 additions and 64 deletions

View File

@ -85,9 +85,6 @@
}
},
"patches": {
"drupal/core": {
"exposed filters": "patches/core/exposed-filters.patch"
},
"drupal/fpa": {
"Drupal 11 compat.": "./patches/fpa/core-11.patch"
},

View File

@ -1,61 +0,0 @@
diff --git a/core/lib/Drupal/Core/Render/Element/Checkboxes.php b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
index 234f25aa904..cdcffbddf2b 100644
--- a/core/lib/Drupal/Core/Render/Element/Checkboxes.php
+++ b/core/lib/Drupal/Core/Render/Element/Checkboxes.php
@@ -60,7 +60,7 @@ public function getInfo() {
public static function processCheckboxes(&$element, FormStateInterface $form_state, &$complete_form) {
$value = is_array($element['#value']) ? $element['#value'] : [];
$element['#tree'] = TRUE;
- if (count($element['#options']) > 0) {
+ if (is_countable($element['#options']) && count($element['#options']) > 0) {
if (!isset($element['#default_value']) || $element['#default_value'] == 0) {
$element['#default_value'] = [];
}
diff --git a/core/lib/Drupal/Core/Render/Element/Radios.php b/core/lib/Drupal/Core/Render/Element/Radios.php
index 7dc1815b36e..0b36d27d7ba 100644
--- a/core/lib/Drupal/Core/Render/Element/Radios.php
+++ b/core/lib/Drupal/Core/Render/Element/Radios.php
@@ -58,7 +58,7 @@ public function getInfo() {
* Expands a radios element into individual radio elements.
*/
public static function processRadios(&$element, FormStateInterface $form_state, &$complete_form) {
- if (count($element['#options']) > 0) {
+ if (is_countable($element['#options']) && count($element['#options']) > 0) {
$weight = 0;
foreach ($element['#options'] as $key => $choice) {
// Maintain order of options as defined in #options, in case the element
diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php
index 85111505e9b..466d3f38a5f 100644
--- a/core/lib/Drupal/Core/Render/Element/Table.php
+++ b/core/lib/Drupal/Core/Render/Element/Table.php
@@ -428,7 +428,7 @@ public static function preRenderTable($element) {
Element::setAttributes($element, ['id']);
// Add sticky headers, if applicable.
- if (count($element['#header']) && $element['#sticky']) {
+ if (is_countable($element['#header']) && count($element['#header']) && $element['#sticky']) {
$element['#attached']['library'][] = 'core/drupal.tableheader';
$element['#attributes']['class'][] = 'sticky-header';
}
@@ -436,7 +436,7 @@ public static function preRenderTable($element) {
// hidden with the classes represented by the constants
// RESPONSIVE_PRIORITY_MEDIUM and RESPONSIVE_PRIORITY_LOW, add the
// tableresponsive behaviors.
- if (count($element['#header']) && $element['#responsive']) {
+ if (is_countable($element['#header']) && count($element['#header']) && $element['#responsive']) {
$element['#attached']['library'][] = 'core/drupal.tableresponsive';
// Add 'responsive-enabled' class to the table to identify it for JS.
// This is needed to target tables constructed by this function.
diff --git a/core/lib/Drupal/Core/Render/Element/Tableselect.php b/core/lib/Drupal/Core/Render/Element/Tableselect.php
index cb38a0722d2..9ced098e05b 100644
--- a/core/lib/Drupal/Core/Render/Element/Tableselect.php
+++ b/core/lib/Drupal/Core/Render/Element/Tableselect.php
@@ -231,7 +231,7 @@ public static function processTableselect(&$element, FormStateInterface $form_st
$element['#tree'] = TRUE;
- if (count($element['#options']) > 0) {
+ if (is_countable($element['#options']) && count($element['#options']) > 0) {
if (!isset($element['#default_value']) || $element['#default_value'] === 0) {
$element['#default_value'] = [];
}