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.
trivial patch.
Comment | File | Size | Author |
---|---|---|---|
#6 | taxonomy-Taxonomy-autocomplete-throws-notice-on-non-match-665420-6.patch | 1.21 KB | fangel |
#3 | 665420-2-taxonomy_autocomplete_notice.patch | 779 bytes | fangel |
taxonomy_autocomplete_notice.patch | 779 bytes | chx | |
Comments
Comment #1
catchThe fix looks good, but I can't reproduce locally, and creation of new terms via autocomplete is tested.
Comment #2
chx CreditAttribution: chx commentedthere is a deeper issue here w nginx and fastcgi and no clean urls.
Comment #3
fangel CreditAttribution: fangel commentedI don't see why this should need further work, the fix is good! However, you might take it one step further and also remove the unneeded
$matches = array();
line.$matches
is never used in the function besides being declared to an empty array.Patch updated to remove the unnecessary line.
You can easily reproduce this error by visiting a url like
taxonomy/autocomplete/
with E_NOTICE enabled, and then checking your dblog atadmin/reports/dblog
- it should now containComment #4
fangel CreditAttribution: fangel commentedComment #6
fangel CreditAttribution: fangel commentedRe-rolled against 7.x git.
Comment #7
fangel CreditAttribution: fangel commentedComment #8
c960657 CreditAttribution: c960657 commentedThis is a duplicate of #1242602: Notices in taxonomy_autocomplete() (actually this issue is much older, but the patch in #1242602 is newer than the patch in this issue).
Comment #9
fangel CreditAttribution: fangel commentedChristian: I agree, if only the later issue also addressed the unused $matches variable, which are only initialized and never used - so it should be removed.