Replies: 1
Whenever I update a product or browse to the products section of the admin panel I get in my error log file these messages.
Strong lines are from a error_log(print_r($menu_order,true)); I added
(So for some reason $menu_order is an integer maybe a product ID)
<strong>[Thu Jul 09 02:18:42.438120 2020] [php7:notice] [pid 23830] [client 1.1.1.1:62900] 103246, referer: https://example.net/wp-admin/</strong>
[Thu Jul 09 02:18:42.438145 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 213, referer: https://example.net/wp-admin/
[Thu Jul 09 02:18:42.438156 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 216, referer: https://example.net/wp-admin/
[Thu Jul 09 02:18:42.438162 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 219, referer: https://example.net/wp-admin/
<strong>[Thu Jul 09 02:18:42.445246 2020] [php7:notice] [pid 23830] [client 1.1.1.1:62900] 103245, referer: https://example.net/wp-admin/</strong>
[Thu Jul 09 02:18:42.445272 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 213, referer: https://example.net/wp-admin/
[Thu Jul 09 02:18:42.445282 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 216, referer: https://example.net/wp-admin/
[Thu Jul 09 02:18:42.445288 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 219, referer: https://example.net/wp-admin/
<strong>[Thu Jul 09 02:18:52.786825 2020] [php7:notice] [pid 24094] [client 1.1.1.1:18666] Array\n(\n [0] => index.php\n [1] => separator1\n [2] => edit.php\n [3] => upload.php\n [4] => lmfwc_licenses\n [5] => edit.php?post_type=page\n [6] => edit-comments.php\n [7] => edit.php?post_type=product\n [8] => woocommerce\n [9] => wc-admin&path=/analytics/revenue\n [10] => woocommerce-marketing\n [11] => separator2\n [12] => themes.php\n [13] => plugins.php\n [14] => users.php\n [15] => tools.php\n [16] => edit.php?post_type=hongobuilder\n [17] => vc-general\n [18] => options-general.php\n [19] => rank-math\n [20] => wp-mail-smtp\n [21] => separator-last\n [22] => mycred\n [23] => mycred_gambling_currency\n [24] => separator-woocommerce\n [25] => revslider\n [26] => mailchimp-woocommerce\n [27] => user-verification\n)\n, referer: https://example.net/wp-admin/edit.php?post_type=product</strong>
I’ve changed to default theme and deactivated all plugins except woocommerce and related, then with everything reactivated except Rank Math SEO there are no errors.
Once I activate Rank Math SEO the error reappear again.