When trying to hide certain location values on a specific content type, I was presented with an error explaining that array_keys expects parameter one to be an array. Properly checking the content of $item['location_settings']['display']['hide']; before passing it through array_filter and array_keys elements the problem. Attached is a quick patch file for checking its value.

CommentFileSizeAuthor
location_cck.patch708 bytestherealwebguy

Comments

tim.plunkett’s picture

confirming error, will check patch in a bit.

shaisachs’s picture

This patch works like a charm, thanks!

shaisachs’s picture

Status: Active » Closed (duplicate)

Actually I take it back - this patch does correct the "line 385" errors, but will produce problems in line 1440 of location.module, since it causes null to be passed to theme('location') for the $hide variable, when an array is expected. Fortunately another patch solves this problem as well (see #373465: Array errors in location_cck module.)