summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfay2017-07-11 17:38:04 (GMT)
committerRenato Goncalves de Araujo2017-07-11 17:38:04 (GMT)
commit3b89238ea2862730a93f6d083360e17d4bc05fbb (patch)
tree46865ddbe39d83b9d05343ada104c919d06d6140
parent3ae6434a74e0e32b1fdac251b3ef22566217e555 (diff)
Issue #1462976 by rfay, StephenRobinson, jbeall, manoloka, RenatoG: Warning: array_filter() [function.array-filter]: The first argument should be an array
-rw-r--r--user_reference/user_reference.module8
1 files changed, 7 insertions, 1 deletions
diff --git a/user_reference/user_reference.module b/user_reference/user_reference.module
index 935499d..6c9e2e8 100644
--- a/user_reference/user_reference.module
+++ b/user_reference/user_reference.module
@@ -889,7 +889,13 @@ function _user_reference_potential_references_views($field, $options) {
function _user_reference_potential_references_standard($field, $options) {
// Avoid useless work.
$filter_roles = array_filter($field['settings']['referenceable_roles']);
- $filter_status = array_filter($field['settings']['referenceable_status']);
+ // $field['settings']['referenceable_status'] may be an int/boolean on D6
+ // upgraded sites
+ $filter_status = array();
+ if (is_array($field['settings']['referenceable_status'])) {
+ // Selects only items in array that are not empty (true, 1, string, etc.)
+ $filter_status = array_filter($field['settings']['referenceable_status']);
+ }
if (!count($filter_status) && !count($filter_roles)) {
return array();
}