Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

The fix looks good, but I can't reproduce locally, and creation of new terms via autocomplete is tested.

chx’s picture

Status: Needs review » Needs work

there is a deeper issue here w nginx and fastcgi and no clean urls.

fangel’s picture

I 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 at admin/reports/dblog - it should now contain

Notice: Undefined variable: term_matches i taxonomy_autocomplete() (linje 128 af /Users/fangel/Sites/version2/drupal7/modules/taxonomy/taxonomy.pages.inc).

fangel’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 665420-2-taxonomy_autocomplete_notice.patch, failed testing.

fangel’s picture

fangel’s picture

Status: Needs work » Needs review
c960657’s picture

Status: Needs review » Closed (duplicate)

This 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).

fangel’s picture

Christian: 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.