Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After upgrading our codebase to 8.0-2.6, we started seeing errors like this:
Notice: Undefined variable: index_config in Drupal\search_api_federated_solr\Form\FederatedSearchPageBlockForm->buildForm() (line 73 of modules/contrib/search_api_federated_solr/src/Form/FederatedSearchPageBlockForm.php).
It seems like https://git.drupalcode.org/project/search_api_federated_solr/commit/792b... might have introduced it?
Comment | File | Size | Author |
---|---|---|---|
#6 | 3072782-fed-search_bad_var.patch | 649 bytes | agentrickard |
Comments
Comment #2
agentrickardUnder what conditions (for example, when browsing to what URL) is this notice shown?
Comment #3
agentrickardThere is also a known bug that needs review in this release -- #3071462: Bad logic for site list - D8.
Comment #4
marcoscanoThanks for the quick feedback!
Another developer reported that, I don't have the details right now, but I can report later if necessary.
In any case, it's an undefined variable php notice, just opening current HEAD with an IDE will indicate the problem on line 73 of
\Drupal\search_api_federated_solr\Form\FederatedSearchPageBlockForm
. Any code path that exercises that line will throw the warning.Comment #5
agentrickardThanks!
Comment #6
agentrickardThat code looks redundant.
Comment #8
agentrickard