Related to #1215192
How to replicate:
1) Create a view that outputs at least 3 rows
2) In mothership theme options, set View Classes configuration as:
- Yes - Remove .view-row
- Yes - Remove .view-row-$count
- No - Remove .view-row-first & .view-row-last
- No - Rename .view-row-$count, .view-row-first & .view-row-last to : count-$count, .first & .last
3) View page. You should get this complaint (notice):
Notice: Undefined offset: 1 in mothership_preprocess_views_view_unformatted() (line 82 of /path/to/mothership/functions/views.php).
Why
This is because in line 82, the conditional states: if ( $vars['classes'] && ($vars['classes'][$id]) ).
Though $vars['classes'][$id] is set for the first row and last rows somewhere above, it isn't set for the middle rows since we're not specifying classes for them. Rather than just checking for $vars['classes'][$id], it should use array_key_exists($id, $vars['classes']) instead.
Will attach patch shortly.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mothership-undefined-index-1995306-1.patch | 568 bytes | victoriachan |
Comments
Comment #1
victoriachan commentedPatch attached.
Comment #2
mortendk commentedwonderfull thanx applied to dev
Comment #3
mortendk commentedComment #4
mortendk commented