Title: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array
Last modified: July 22, 2025

---

# Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array

 *  Resolved [ballyhooltd](https://wordpress.org/support/users/ballyhooltd/)
 * (@ballyhooltd)
 * [10 months, 3 weeks ago](https://wordpress.org/support/topic/uncaught-typeerror-array_keys-argument-1-array-must-be-of-type-array-2/)
 * The following error has recently started occuring when your plugin is enabled:
 * WordPress version 6.8.2
   Current plugin: WP Admin Audit (version 1.2.15)PHP version
   8.1.33
 * Error Details
 * An error of type E_ERROR was caused in line 23 of the file /srv/websites/[site-
   name]/httpdocs/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php.
   Error message: Uncaught TypeError: array_keys(): Argument #1 ($array) must be
   of type array, null given in /srv/websites/[site-name]/httpdocs/wp-content/plugins/
   wp-admin-audit/classes/Utils/PostUtils.php:23
   Stack trace: 0 /srv/websites/[site-
   name]/httpdocs/wp-content/plugins/wp-admin-audit/classes/Utils/PostUtils.php(
   23): array_keys() 1 /srv/websites/[site-name]/httpdocs/wp-content/plugins/wp-
   admin-audit/classes/Sensors/Post.php(251): WADA_PostUtils::getChangedMeta() 2/
   srv/websites/[site-name]/httpdocs/wp-content/plugins/wp-admin-audit/classes/Sensors/
   Post.php(196): WADA_Sensor_Post->getPostMetaEventDetails() 3 /srv/websites/[site-
   name]/httpdocs/wp-includes/class-wp-hook.php(324): WADA_Sensor_Post->onAfterPostInsert()
   4 /srv/websites/[site-name]/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook-
   >apply_filters() 5 /srv/websites/[site-name]/httpdocs/wp-includes/plugin.php(
   517): WP_Hook->do_action() 6 /srv/websites/[site-name]/httpdocs/wp-includes/post.
   php(5831): do_action() 7 /srv/websites/[site-name]/httpdocs/wp-includes/post.
   php(5124): wp_after_insert_post() 8 /srv/websites/[site-name]/httpdocs/wp-content/
   plugins/duplicate-page/duplicatepage.php(192): wp_insert_post() 9 /srv/websites/[
   site-name]/httpdocs/wp-content/plugins/duplicate-page/duplicatepage.php(122):
   duplicate_page->duplicate_edit_post() 10 /srv/websites/[site-name]/httpdocs/wp-
   includes/class-wp-hook.php(324): duplicate_page->dt_duplicate_post_as_draft()
   11 /srv/websites/[site-name]/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook-
   >apply_filters() 12 /srv/websites/[site-name]/httpdocs/wp-includes/plugin.php(
   517): WP_Hook->do_action() 13 /srv/websites/[site-name]/httpdocs/wp-admin/admin.
   php(420): do_action() 14 {main}

Viewing 1 replies (of 1 total)

 *  Plugin Author [brandtoss](https://wordpress.org/support/users/brandtoss/)
 * (@brandtoss)
 * [10 months, 2 weeks ago](https://wordpress.org/support/topic/uncaught-typeerror-array_keys-argument-1-array-must-be-of-type-array-2/#post-18568325)
 * Hello [@ballyhooltd](https://wordpress.org/support/users/ballyhooltd/) !
 * Thanks for reaching out and thanks for including the full error stack trace. 
   That helps a lot for identifying the issue.
 * Please install version v1.2.16 (releasd a couple of minutes ago) which contains
   a fix for that issue.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type
array’ is closed to new replies.

 * ![](https://ps.w.org/wp-admin-audit/assets/icon-256x256.png?rev=2670667)
 * [WP Admin Audit](https://wordpress.org/plugins/wp-admin-audit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-admin-audit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-admin-audit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-admin-audit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-admin-audit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-admin-audit/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [brandtoss](https://wordpress.org/support/users/brandtoss/)
 * Last activity: [10 months, 2 weeks ago](https://wordpress.org/support/topic/uncaught-typeerror-array_keys-argument-1-array-must-be-of-type-array-2/#post-18568325)
 * Status: resolved