Undefined array key warning when prop or slot is not selected
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3590376. -->
Reported by: [ultimike](https://www.drupal.org/user/51132)
Related to !12
>>>
<p>When a prop or slot is not assigned to a field/value in the Views "Page: Row style options" modal, the following PHP warning is thrown (see "Recent log messages"):</p>
<p><code>Warning: Undefined array key 1 in Drupal\views_row_sdc\Plugin\views\row\ComponentRow->submitOptionsForm() (line 227 of /var/www/html/src/Plugin/views/row/ComponentRow.php) </code></p>
<p>@lostcarpark and I discovered this bug while working on <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/views_row_sdc/-/work_items/3590280" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/views_row_sdc/-/work_items/3590280</a></span>. The solution is that there needs to be a check around lines 227 and 241 of the plugin to ensure a value was selected.</p>
<p>-mike</p>
issue