Problem/Motivation

Getting a warning as follows:

Warning: array_merge(): Expected parameter 17 to be an array, null given in bootstrap_classes_block_form_block_form_alter() (line 39 of /home/sites/site/public_html/modules/contrib/bootstrap_classes/modules/block/bootstrap_classes_block.module). => Array

Steps to reproduce

Enable debugging and messages to the screen and edit a block.

Proposed resolution

Fix the code

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 3183779-3.patch663 bytesdench0
#2 3183779-2.patch365 bytesdench0

Comments

Christopher Riley created an issue. See original summary.

dench0’s picture

Status: Active » Needs review
StatusFileSize
new365 bytes

Try this patch.

Christopher Riley’s picture

Seems to have addressed part of the issue. The editing block page now loads however I still have the following warning:

Warning: array_combine() expects parameter 1 to be array, null given in Drupal\bootstrap_classes\BootstrapClasses->getClasses() (line 307 of /home/sites/site/public_html/modules/contrib/bootstrap_classes/src/BootstrapClasses.php).

This only happened once when I was editing the site branding block. Now however it doesn't seem to be kicking any warning. I will add more information if it becomes available.

dench0’s picture

StatusFileSize
new663 bytes

Oh, I found what caused that warning. You saw it only once because class options are cached. IF you clear the cache and then again go to the block configuration - you should see it again. I attached the new patch.

  • d89763d committed on 1.0.x
    Issue #3183779 by dench0, Christopher Riley: Warning when editing a...
dench0’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.