ConfigSubscriber::destruct() crashes with TypeError when config is renamed or deleted during import
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3585127. -->
Reported by: [saidatom](https://www.drupal.org/user/1846674)
Related to !83
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>During config import, if a configuration is saved and then renamed or deleted in the same request, <code>ConfigSubscriber::destruct()</code> crashes with:</p>
<p><code>TypeError: NestedArray::getValue(): Argument #1 ($array) must be of type array, false given, called in ConfigSubscriber.php on line 223</code></p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Reproduced with config renames like: block.block.xpto_languagepicker → block.block.xpto_language_picker</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Remove stale names from <code>$this->names</code> in <code>onConfigRename()</code> and <code>onConfigDelete()</code>, plus a defensive check in <code>destruct()</code>.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue