CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Warning: in_array() expects parameter 2 to be array
Pages: [1]

Author Topic: Warning: in_array() expects parameter 2 to be array  (Read 2639 times)

mudnik

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: drupal
  • MySQL version: 5.5.34-cll
  • PHP version: 5.4.23
Warning: in_array() expects parameter 2 to be array
December 17, 2013, 05:17:58 pm
I'm getting this warning message on top of the website when I click on "my account" inside drupal. Anyone knows what could be causing it?

Warning: in_array() expects parameter 2 to be array, null given in CRM_ACL_API::groupPermission() (line 202 of /home/xxxx/public_html/sites/all/modules/civicrm/CRM/ACL/API.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_ACL_API::groupPermission() (line 202 of /home/xxxx/public_html/sites/all/modules/civicrm/CRM/ACL/API.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_ACL_API::groupPermission() (line 202 of /home/xxxx/public_html/sites/all/modules/civicrm/CRM/ACL/API.php).
Warning: in_array() expects parameter 2 to be array, null given in CRM_ACL_API::groupPermission() (line 202 of /home/xxxx/public_html/sites/all/modules/civicrm/CRM/ACL/API.php).

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Warning: in_array() expects parameter 2 to be array
December 18, 2013, 08:48:38 am

1. what user are you?

2. does this user have access to any groups?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mudnik

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: drupal
  • MySQL version: 5.5.34-cll
  • PHP version: 5.4.23
Re: Warning: in_array() expects parameter 2 to be array
December 18, 2013, 01:48:07 pm
Normal user.

I realised that the error message only appears if the user is a member of a public group.

In fact, for every group that the user belongs to, the error message will appear twice.

mudnik

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: drupal
  • MySQL version: 5.5.34-cll
  • PHP version: 5.4.23
Re: Warning: in_array() expects parameter 2 to be array
December 18, 2013, 06:29:10 pm
when I login as user 1, the message does not appear.

mudnik

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: drupal
  • MySQL version: 5.5.34-cll
  • PHP version: 5.4.23
Re: Warning: in_array() expects parameter 2 to be array
December 27, 2013, 05:14:20 pm
anyone got a clue?

mudnik

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 0
  • CiviCRM version: 4.5.3
  • CMS version: drupal
  • MySQL version: 5.5.34-cll
  • PHP version: 5.4.23
Re: Warning: in_array() expects parameter 2 to be array
January 07, 2014, 07:44:03 am
Is there a permission setting that I have not set properly in drupal for groups to work?

karunadave

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
    • Karuna Dev
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6.30 or Drupal 7.26 Drush 6.2.0
  • MySQL version: 5.5.35-cll - MySQL Community Server (GPL)
  • PHP version: 5.3.21
Re: Warning: in_array() expects parameter 2 to be array
June 29, 2014, 11:31:19 pm
Hello

I am receiving an identical error message, when subscribing to a new mailing list group with an email address that already exists in the system using this form: http://example.org/civicrm/profile/create?gid=8&reset=1

The message occurs once for each new group that I am subscribing to.

warning: in_array() expects parameter 2 to be array, null given in /home/example/public_html/sites/all/modules/civicrm/CRM/ACL/API.php on line 202.
warning: in_array() expects parameter 2 to be array, null given in /home/example/public_html/sites/all/modules/civicrm/CRM/ACL/API.php on line 202.
warning: in_array() expects parameter 2 to be array, null given in /home/example/public_html/sites/all/modules/civicrm/CRM/ACL/API.php on line 202.
warning: in_array() expects parameter 2 to be array, null given in /home/example/public_html/sites/all/modules/civicrm/CRM/ACL/API.php on line 202.

karunadave

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 0
    • Karuna Dev
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6.30 or Drupal 7.26 Drush 6.2.0
  • MySQL version: 5.5.35-cll - MySQL Community Server (GPL)
  • PHP version: 5.3.21
Re: Warning: in_array() expects parameter 2 to be array
June 30, 2014, 10:27:20 am
I believe I am wrong, just as Mudnik states, it is like that.

Quote from: mudnik on December 18, 2013, 01:48:07 pm
In fact, for every group that the user belongs to, the error message will appear twice.

linkx

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 7
Re: Warning: in_array() expects parameter 2 to be array
February 16, 2015, 03:11:42 pm
Check your Drupal permissions. The authenticated user role needs to have permission to profile listings.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Warning: in_array() expects parameter 2 to be array

This forum was archived on 2017-11-26.