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.
| Comment | File | Size | Author |
|---|---|---|---|
| location_cck.patch | 708 bytes | therealwebguy |
Comments
Comment #1
tim.plunkettconfirming error, will check patch in a bit.
Comment #2
shaisachs commentedThis patch works like a charm, thanks!
Comment #3
shaisachs commentedActually 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.)