Notice: Array to string conversion in material_admin_preprocess_input() (line 81 of themes/contrib/material_admin/inc/preprocess.inc).

Fixed in 8.x-1.x but needs to be ported to 2.x

Attached patch.

Comments

ocastle created an issue. See original summary.

osman’s picture

The patch works.

But may I ask why not simplify like this?

diff --git a/inc/preprocess.inc b/inc/preprocess.inc
index 6e92b9b..3667fa3 100644
--- a/inc/preprocess.inc
+++ b/inc/preprocess.inc
@@ -84,7 +84,7 @@ function material_admin_preprocess_menu_local_task(&$variables) {
  */
 function material_admin_preprocess_input(&$variables) {
   $element = $variables['element'];
-  if (isset($variables['attributes']['placeholder']) && empty(implode($variables['attributes']['placeholder']))) {
+  if (empty($variables['attributes']['placeholder'])) {
     unset($variables['attributes']['placeholder']);
   }
   $variables['children'] = $element['#children'];
grigoriunicolae’s picture

StatusFileSize
new830 bytes

Patch for 2.x version

grigoriunicolae’s picture

StatusFileSize
new899 bytes
grigoriunicolae’s picture

StatusFileSize
new961 bytes
jwineichen’s picture

#5 patch worked for me

it-cru’s picture

Status: Needs review » Reviewed & tested by the community

#5 patch worked for me also with PHP 8.0

it-cru’s picture

Priority: Normal » Critical

Raised priority to critical because site could not be usable anymore.

dshumaker’s picture

Just fyi, this #5 patch also fixed this other bug ( https://www.drupal.org/comment/reply/3299145#comment-form ) for me.

Drupal 9.4.5
Php 8.1.8