Title: PHP Warning: array_merge()
Last modified: August 22, 2022

---

# PHP Warning: array_merge()

 *  Resolved [Milan](https://wordpress.org/support/users/milankisz/)
 * (@milankisz)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-7/)
 * Hello,
 * I get the following error when using the plugin:
 * PHP message: PHP Warning: array_merge(): Expected parameter 1 to be an array,
   string given in /wp-content/plugins/controlled-admin-access/core/migrations/class-
   migration-200.php on line 57
 * Corresponding code:
 * $newUser->setCreatedBy(get_current_user_id());
 * $mainMenu = get_user_meta($user->ID, ‘caa_main_menu’, true);
    $subMenu = get_user_meta(
   $user->ID, ‘caa_sub_menu’, true);
 * $restricted_items = array_merge($mainMenu, $subMenu);
 * $newUser->setRestrictedMenu($restricted_items);
 * Please help me.
    Thanks, Milan

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

 *  Plugin Author [Waseem Senjer](https://wordpress.org/support/users/waseem_senjer/)
 * (@waseem_senjer)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-7/#post-15938595)
 * Hello [@milankisz](https://wordpress.org/support/users/milankisz/)
    Would you
   please update the plugin to the latest version? This update should fix the issue.
 *  Thread Starter [Milan](https://wordpress.org/support/users/milankisz/)
 * (@milankisz)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-7/#post-15938820)
 * it’s works, thank you for the quick help
 * Milan

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

The topic ‘PHP Warning: array_merge()’ is closed to new replies.

 * ![](https://ps.w.org/controlled-admin-access/assets/icon-128x128.gif?rev=2773094)
 * [Controlled Admin Access](https://wordpress.org/plugins/controlled-admin-access/)
 * [Support Threads](https://wordpress.org/support/plugin/controlled-admin-access/)
 * [Active Topics](https://wordpress.org/support/plugin/controlled-admin-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/controlled-admin-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/controlled-admin-access/reviews/)

## Tags

 * [array_merge](https://wordpress.org/support/topic-tag/array_merge/)

 * 2 replies
 * 2 participants
 * Last reply from: [Milan](https://wordpress.org/support/users/milankisz/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/php-warning-array_merge-7/#post-15938820)
 * Status: resolved