Title: in_array() expects parameter&#8230;
Last modified: October 26, 2019

---

# in_array() expects parameter…

 *  Resolved [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/)
 * [19-Sep-2019 20:21:02 UTC] PHP Warning: in_array() expects parameter 2 to be 
   array, string given in /home/executorium/public_html/wp-content/plugins/object-
   sync-for-salesforce/classes/logging.php on line 454

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12068969)
 * Okay. That doesn’t give me much to go on, but I’ll look out for it to see if 
   I can reproduce it. In any case this doesn’t strike me as a support request as
   much as a possible bug, especially if it can be reproduced.
    -  This reply was modified 6 years, 7 months ago by [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/).
      Reason: typo
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12073791)
 * Thank you
    I’ve found some more problems, I cant seem to get this thing to map
   anything because there are no objects showing in salesforce. I’m new to this 
   project, so I’m wondering what could be causing this.
 * > [Salesforce](https://imgur.com/a/tX3X5V7)
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12073840)
 * That is helpful. There appear to be several issues:
 * 1. You don’t seem to have authorized the plugin to connect to your Salesforce.
   That is what the “Salesforce needs to be authorized” message indicates. More 
   specifically, the plugin does a check to see if you’ve done an authorization 
   within Salesforce, and if not, it shows that message. I’m not sure how you got
   to this screen without authorizing. I’m going to see if I can determine how that
   happened; it shouldn’t be possible.
 * 2. If the plugin was authorized in Salesforce (I think you wouldn’t see that 
   message), there are a few cases where you wouldn’t see Salesforce objects in 
   the dropdown. This happens if the app in Salesforce is not given the correct 
   permissions. Usually you need “Perform requests on your behalf at any time” for
   OAuth Scope as well as “Access and manage your data (api)” as permissions on 
   the Salesforce app.
 * It’s possible that if you’ve already tried to authorize the plugin in Salesforce,
   it doesn’t have the correct permission level and it’s confusing itself. I haven’t
   seen that happen this way, but it is possible.
 *  [admailsupport](https://wordpress.org/support/users/admailsupport/)
 * (@admailsupport)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12074122)
 * Sorry, somehow the account switched.
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12074126)
 * I had already authorized. But now, I click on the Authorize and it takes me to
   the dashboard with no additional errors in the error logs. Strange.
    -  This reply was modified 6 years, 7 months ago by [Michael](https://wordpress.org/support/users/mgparisi/).
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12074156)
 * All of the Permissions you listed have been provided.
 * Application Permissions: Perform requests on your behalf at any time
    Provide
   access to custom applications Access your basic information Full access Provide
   access to your data via the Web Access and manage your data
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12074162)
 * Tried clearing plugin cache and got this..
    “There was an error clearing the 
   plugin cache. Try refreshing this page.”
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12080297)
 * Any way around this?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12080469)
 * I think you might could try uninstalling and reinstalling the plugin. It appears
   to be giving you a lot of trouble, maybe because the initial install didn’t seem
   to finish.
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12081142)
 * Hey Jonathan,
 * First… THANKS FOR YOUR REPLY AND HELP!!!!
 * Second… Got another hint…
 * Tried to authorize today. This time I didn’t jump to my dashboard. I think its
   cause I may not have been authorized in salesforce today. So I got an error from
   salesforce:
 * “We can’t authorize you because of an OAuth error. For more information, contact
   your Salesforce administrator.
 * OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication.
   Please try again.”
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12081147)
 * Now I tried again (while logged in) I get a redirect to the dashboard. I’m going
   to report this as a bug because it should be giving us the error if Im logged
   in.
 * Now I’m wondering why it doesn’t authorize. I’ll try a few more times.
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12081167)
 * And now, I logged out. Tried the authorize again. This time after logging into
   salesforce, it took me right to the dashboard. So the issue is a bit more complicated.
   Would help if I could see an error somehow.
 *  Thread Starter [Michael](https://wordpress.org/support/users/mgparisi/)
 * (@mgparisi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12081733)
 * solved it. Did a new App and reset all the values in salesforce.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘in_array() expects parameter…’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/mgparisi/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/in_array-expects-parameter/#post-12081733)
 * Status: resolved