Title: Warning: array_key_exists() expects parameter 2 to be array, null given
Last modified: July 14, 2020

---

# Warning: array_key_exists() expects parameter 2 to be array, null given

 *  Resolved [defotoverij](https://wordpress.org/support/users/defotoverij/)
 * (@defotoverij)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/)
 * Hi,
 * For more than a year now, I’m a happy user of the custom-upload-dir plugin.
    
   At this moment, I receive the folowing error when adding products to my shopping
   cart: Warning: array_key_exists() expects parameter 2 to be array, null given
   in /home/deb90669/domains/defotoverij.be/public_html/wp-content/plugins/custom-
   upload-dir/custom_upload_dir.php on line 184
 * I’m using version 3.4.5 of the plugin and wordpress 5.4.2.
 * Do you have any idea what could go wrong? Adding products that don’t require 
   a file to be uploaded, still work fine.
 * Thanks for your help!
    Lieven
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-array_key_exists-expects-parameter-2-to-be-array-null-given%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [defotoverij](https://wordpress.org/support/users/defotoverij/)
 * (@defotoverij)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/#post-13120597)
 * I did a few more tests. When I rollback the custom-upload-dir to version 3.4.3.2
   my site works fine again. Hope this helps to find the problem.
    If I can help
   with further information, please let me know!
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/#post-13134768)
 * Thanks for reporting! I need help testing the patch – can you [install the fixed version from trunk](https://plugins.svn.wordpress.org/custom-upload-dir/trunk/)
   and try to replicate the issue?
    1. Download custom_upload_dir.php and readme.txt, and replace the ones on your 
       server.
    2. Try to replicate the error.
    3. Let me know if it works, so I can publish the patch.
 * Thanks again!
 *  Thread Starter [defotoverij](https://wordpress.org/support/users/defotoverij/)
 * (@defotoverij)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/#post-13135000)
 * Wow, thanks for your fast response!
    I installed your new version 3.4.6 and everything
   seems to work fine now. Great help! As far as I’m concerned, your patch is ready
   for being published!
 * Thanks again and good luck with your future developments!
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/#post-13135046)
 * Great. 3.4.6 is the new stable version. Everyone will be notified about the upgrade
   in their WordPress admin panel. Thanks for the quick feedback!

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

The topic ‘Warning: array_key_exists() expects parameter 2 to be array, null given’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-upload-dir.svg)
 * [Custom Upload Dir](https://wordpress.org/plugins/custom-upload-dir/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-upload-dir/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-upload-dir/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-upload-dir/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-upload-dir/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-upload-dir/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ulfben](https://wordpress.org/support/users/ulfben/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-null-given/#post-13135046)
 * Status: resolved