Download & Extend

Fix notice in _find_view_arguments()

Project:View Alias
Version:6.x-2.1
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review

Issue Summary

When saving a new node I get notices in _find_view_arguments().

Notice: Undefined index: arguments in _find_view_arguments() (line 213 of /Users/nate/Sites/example/sites/all/modules/contrib/view_alias/view_alias.module).

The general call stack looks like this:

node_save() ->
taxonomy_nodeapi() ->
hook_taxonomy ->
view_alias_taxonom() ->
_get_aliasable_displays() ->
_find_view_arguments().

The trouble is many of my views do not have Taxonomy Term arguments defined, and _find_view_arguments() tries to check $display->display_options['arguments']['tid'] when no arguments exit at all.

This patch wraps the contents of _find_view_arguments() in an IF statement to prevent these notices.

AttachmentSize
view_alias_notices.patch1.48 KB
nobody click here