<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>PHP Warning: array_merge()

[ad_1]

Replies: 2

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer