summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrenatog2017-07-27 22:28:10 (GMT)
committerRenato Goncalves de Araujo2017-07-27 22:28:10 (GMT)
commit1b0bcb060aede97825e5fce15847ba2e37fd8a5d (patch)
tree1f953844ad11d6d7709f7e3437247f55dc9ffa9a
parent0b72aa3d5dcae77cbeca198ab43d9c9b097d1620 (diff)
Issue #1679350 by RenatoG, jfha73: Warnings showing up
-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 6c9e2e8..162c436 100644
--- a/user_reference/user_reference.module
+++ b/user_reference/user_reference.module
@@ -887,8 +887,14 @@ function _user_reference_potential_references_views($field, $options) {
* List of referenceable users defined by user role and status.
*/
function _user_reference_potential_references_standard($field, $options) {
+
+ $filter_roles = array();
+
// Avoid useless work.
- $filter_roles = array_filter($field['settings']['referenceable_roles']);
+ if (is_array($field['settings']['referenceable_roles'])) {
+ $filter_roles = array_filter($field['settings']['referenceable_roles']);
+ }
+
// $field['settings']['referenceable_status'] may be an int/boolean on D6
// upgraded sites
$filter_status = array();