Hello,

I was working on implementing a form_alter() for a View that had exposed filters (my goal was to remove some of the items from the exposed filter). The exposed filter is displaying dates as Years associated with some nodes. I'm able to alter the form, but when the user tries to select a different year from the exposed filter, there's a "Fatal error: cannot unset string offsets" in date_views/includes/date_views_filter_handler_simple.inc.

The simple fix for this is to check if $element_input is an array before attempting to call unset() on it.

Comments

kostajh’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB
podarok’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

looks good for me, RTBC
don`t know - do we need tests here?

vijaycs85’s picture

Committed b248f8f and pushed to 7.x-2.x. Thanks! @kostajh made first commit to date module (http://drupalcode.org/project/date.git/search/b248f8f?s=kostajh;st=author) yay!!!

vijaycs85’s picture

Status: Reviewed & tested by the community » Fixed
kostajh’s picture

Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.