Title: Problem plugin PHP
Last modified: February 19, 2024

---

# Problem plugin PHP

 *  Resolved [Albert](https://wordpress.org/support/users/trust17/)
 * (@trust17)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/problem-plugin-php/)
 * Hello good afternoon!
 * I got this error this morning, the website is still working, but I think it’s
   more of an internal problem of the PHP version, I copy and paste the code in 
   case it helps. I copy and paste the code in case it helps you. Is it possible
   that there is some incompatibility with the new versions of WooCommerce?
 *     ```wp-block-code
       Para mantener a salvo tu sitio, este enlace caducará en 1 día. No te preocupes por eso, a pesar de esto se te enviará un nuevo enlace por correo electrónico si ocurre de nuevo el error después de que caduque.
   
       A la hora de buscar ayuda con este problema puede que se te pida algo de la siguiente información:
       WordPress versión 6.4.3
       Tema activo: Yobitos (versión 1.0)
       Plugin actual: MultiVendorX (versión 4.1.3) PHP versión 8.1.27
   
       Detalles del error
       ==================
       Se ha producido un error del tipo E_ERROR en la línea 1339 del archivo /httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php. Mensaje de error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php:1339
       Stack trace:
       #0 /wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php(1339): in_array()
       #1 /wp-includes/class-wp-hook.php(324): MVX_Product->convert_business_id_to_taxonomy_term_in_query()
       #2 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
       #3 /wp-includes/plugin.php(565): WP_Hook->do_action()
       #4 /wp-includes/class-wp-query.php(1881): do_action_ref_array()
       #5 /wp-includes/class-wp-query.php(3824): WP_Query->get_posts()
       #6 /wp-includes/class-wp-query.php(3956): WP_Query->query()
       #7 /wp-content/plugins/woocommerce/src/Blocks/Patterns/PatternsHelper.php(45): WP_Query->__construct()
       #8 /wp-content/plugins/woocommerce/src/Blocks/Patterns/PatternsHelper.php(109): Automattic\WooCommerce\Blocks\Patterns\PatternsHelper::get_patterns_ai_data_post()
       #9 /wp-content/plugins/woocommerce/src/Blocks/BlockPatterns.php(133): Automattic\WooCommerce\Blocks\Patterns\PatternsHelper::get_patterns_dictionary()
       #10 /wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockPatterns->register_block_patterns()
       #11 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
       #12 /wp-includes/plugin.php(517): WP_Hook->do_action()
       #13 /wp-settings.php(643): do_action()
       #14 /wp-config.php(87): require_once('...')
       #15 /wp-load.php(50): require_once('...')
       #16 /wp-admin/admin.php(34): require_once('...')
       #17 /wp-admin/edit.php(10): require_once('...')
       #18 {main}
         thrown
       ```
   
 * Thank you very much!
    -  This topic was modified 2 years, 3 months ago by [Albert](https://wordpress.org/support/users/trust17/).
    -  This topic was modified 2 years, 3 months ago by [Albert](https://wordpress.org/support/users/trust17/).

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

 *  Plugin Support [mouindi](https://wordpress.org/support/users/mouindi/)
 * (@mouindi)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17439279)
 * Hi [@trust17](https://wordpress.org/support/users/trust17/),We’re sorry to hear
   that you’ve encountered this issue.
 * Upon reviewing the codes on our end, we’ve found that they should not generate
   any errors on the site. Additionally, after conducting further tests, we didn’t
   encounter any such issue.
 * Could you please provide us with the steps to reproduce this problem on our end?
   This will help us assist you further with resolving the issue.
 *  Thread Starter [Albert](https://wordpress.org/support/users/trust17/)
 * (@trust17)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17448516)
 * Hi Mouindi,
 * What I did was to update and that error appeared, the web continues to work without
   problem, but I do not understand what plugin or thing is giving the problem. 
   I do not know if there is a way to activate the log to pass it to you so you 
   can see it more calmly.
 * You tell me, greetings and thanks!
 *  Plugin Support [mouindi](https://wordpress.org/support/users/mouindi/)
 * (@mouindi)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17453041)
 * [@trust17](https://wordpress.org/support/users/trust17/), Could you kindly conduct
   a brief test?
 * Please edit any product from the admin end to see if the error persists. There
   seems to be no practical reason behind this error.
 * We look forward to receiving your test results.
 *  Thread Starter [Albert](https://wordpress.org/support/users/trust17/)
 * (@trust17)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17464125)
 * Hi Mouindi, in practice it is working fine. But I keep getting this mail every
   few days, today again:
 * > ¡Hola!
   > WordPress tiene una característica incluida que detecta cuando un plugin o 
   > tema provoca un error fatal en tu sitio, y te avisa con este correo electrónico
   > automático.
   > En este caso, WordPress ha detectado un error con uno de tus plugins, MultiVendorX.
   > Antes de nada visita tu web ([https://yobitos.com/](https://yobitos.com/)) 
   > y revisa cualquier problema visible. A continuación visita la página donde 
   > se capturó el error ([https://yobitos.com/wp-admin/edit.php?orderby=menu_order+title&order=ASC&s&post_status=all&post_type=product&action=-1&dc_vendor_shop=414&seo_filter&readability_filter&product_cat=san-valentin&product_type&stock_status&filter_action=Filtrar&paged=1&action2=-1](https://yobitos.com/wp-admin/edit.php?orderby=menu_order+title&order=ASC&s&post_status=all&post_type=product&action=-1&dc_vendor_shop=414&seo_filter&readability_filter&product_cat=san-valentin&product_type&stock_status&filter_action=Filtrar&paged=1&action2=-1))
   > y revisa cualquier problema visible.
   > Por favor, ponte en contacto con tu alojamiento para que te ayude a investigar
   > más a fondo este problema.
   > Si tu sitio se muestra roto y no puedes acceder normalmente a tu escritorio,
   > WordPress tiene un «modo de recuperación» especial. Esto te permite acceder
   > de manera segura a tu escritorio y seguir investigando.
   > Para mantener a salvo tu sitio, este enlace caducará en 1 día. No te preocupes
   > por eso, a pesar de esto se te enviará un nuevo enlace por correo electrónico
   > si ocurre de nuevo el error después de que caduque.
   > A la hora de buscar ayuda con este problema puede que se te pida algo de la
   > siguiente información:
   > WordPress versión 6.4.3Tema activo: Yobitos (versión
   > 1.0)Plugin actual: MultiVendorX (versión 4.1.3) PHP versión 8.1.27Detalles 
   > del error
   > Se ha producido un error del tipo E_ERROR en la línea 1339 del archivo /var/
   > www/vhosts/yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/
   > classes/class-mvx-product.php. Mensaje de error: Uncaught TypeError: in_array():
   > Argument #2 ($haystack) must be of type array, null given in /var/www/vhosts/
   > yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/
   > class-mvx-product.php:1339
   > Stack trace:0 /var/www/vhosts/yobitos.com/httpdocs/
   > wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php(
   > 1339): in_array()1 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-
   > hook.php(324): MVX_Product->convert_business_id_to_taxonomy_term_in_query()
   > 2 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(348): 
   > WP_Hook->apply_filters()3 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/
   > plugin.php(565): WP_Hook->do_action()4 /var/www/vhosts/yobitos.com/httpdocs/
   > wp-includes/class-wp-query.php(1881): do_action_ref_array()5 /var/www/vhosts/
   > yobitos.com/httpdocs/wp-includes/class-wp-query.php(3824): WP_Query->get_posts()
   > 6 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-query.php(3956):
   > WP_Query->query()7 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/
   > woocommerce/src/Blocks/Patterns/PatternsHelper.php(45): WP_Query->__construct()
   > 8 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/src/Blocks/
   > Patterns/PatternsHelper.php(109): Automattic\WooCommerce\Blocks\Patterns\PatternsHelper::
   > get_patterns_ai_data_post()9 /var/www/vhosts/yobitos.com/httpdocs/wp-content/
   > plugins/woocommerce/src/Blocks/BlockPatterns.php(133): Automattic\WooCommerce\
   > Blocks\Patterns\PatternsHelper::get_patterns_dictionary()10 /var/www/vhosts/
   > yobitos.com/httpdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\
   > Blocks\BlockPatterns->register_block_patterns()11 /var/www/vhosts/yobitos.com/
   > httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()12 /var/
   > www/vhosts/yobitos.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
   > 13 /var/www/vhosts/yobitos.com/httpdocs/wp-settings.php(643): do_action()14/
   > var/www/vhosts/yobitos.com/httpdocs/wp-config.php(87): require_once(‘…’)15 /
   > var/www/vhosts/yobitos.com/httpdocs/wp-load.php(50): require_once(‘…’)16 /var/
   > www/vhosts/yobitos.com/httpdocs/wp-admin/admin.php(34): require_once(‘…’)17/
   > var/www/vhosts/yobitos.com/httpdocs/wp-admin/edit.php(10): require_once(‘…’)
   > 18 {main}
   > thrown
 * If I access the website that tells me the error this appears:
 * **Warning**: Attempt to read property “roles” on bool in **/var/www/vhosts/yobitos.
   com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-
   product.php** on line **1339**
 * **Fatal error**: Uncaught TypeError: in_array(): Argument #2 ($haystack) must
   be of type array, null given in /var/www/vhosts/yobitos.com/httpdocs/wp-content/
   plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php:1339 Stack 
   trace: #0 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-
   multi-vendor/classes/class-mvx-product.php(1339): in_array() #1 /var/www/vhosts/
   yobitos.com/httpdocs/wp-includes/class-wp-hook.php(324): MVX_Product->convert_business_id_to_taxonomy_term_in_query()#
   2 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook-
   >apply_filters() #3 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/plugin.php(
   565): WP_Hook->do_action() #4 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/
   class-wp-query.php(1881): do_action_ref_array() #5 /var/www/vhosts/yobitos.com/
   httpdocs/wp-includes/class-wp-query.php(3824): WP_Query->get_posts() #6 /var/
   www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-query.php(3956): WP_Query-
   >query() #7 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/
   src/Blocks/Patterns/PatternsHelper.php(45): WP_Query->__construct() #8 /var/www/
   vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/src/Blocks/Patterns/
   PatternsHelper.php(109): Automattic\WooCommerce\Blocks\Patterns\PatternsHelper::
   get_patterns_ai_data_post() #9 /var/www/vhosts/yobitos.com/httpdocs/wp-content/
   plugins/woocommerce/src/Blocks/BlockPatterns.php(133): Automattic\WooCommerce\
   Blocks\Patterns\PatternsHelper::get_patterns_dictionary() #10 /var/www/vhosts/
   yobitos.com/httpdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\
   Blocks\BlockPatterns->register_block_patterns() #11 /var/www/vhosts/yobitos.com/
   httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /var/
   www/vhosts/yobitos.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()#
   13 /var/www/vhosts/yobitos.com/httpdocs/wp-settings.php(643): do_action() #14/
   var/www/vhosts/yobitos.com/httpdocs/wp-config.php(87): require_once(‘…’) #15 /
   var/www/vhosts/yobitos.com/httpdocs/wp-load.php(50): require_once(‘…’) #16 /var/
   www/vhosts/yobitos.com/httpdocs/wp-admin/admin.php(34): require_once(‘…’) #17/
   var/www/vhosts/yobitos.com/httpdocs/wp-admin/edit.php(10): require_once(‘…’) #
   18 {main} thrown in **/var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/
   dc-woocommerce-multi-vendor/classes/class-mvx-product.php** on line **1339**
 * **For now I have updated and updated the plugins that asked me to update and 
   the link above no longer gives error. Let me test it for a few days and I’ll 
   let you know by the end of next week.**
 * Thank you!
    -  This reply was modified 2 years, 2 months ago by [Albert](https://wordpress.org/support/users/trust17/).
    -  This reply was modified 2 years, 2 months ago by [Albert](https://wordpress.org/support/users/trust17/).
 *  Plugin Support [mouindi](https://wordpress.org/support/users/mouindi/)
 * (@mouindi)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17465063)
 * Sure [@trust17](https://wordpress.org/support/users/trust17/), please do keep
   us posted.
 *  Thread Starter [Albert](https://wordpress.org/support/users/trust17/)
 * (@trust17)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17700238)
 * Hi [@mouindi](https://wordpress.org/support/users/mouindi/)
 * After updating Multivendor today (the wordpress I keep it in 6.4.4) these errors
   appear often, the web as I said works anyway, but sometimes they tell me that
   orders are canceled to resellers (rarely but it happens) and does not warn if
   you do not look manually.
 * I write you the error that sends me:
 *     ```wp-block-code
       Details of the error==================
       An error of type E_ERROR has occurred on line 1340 of the file /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php. Mensaje de error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php:1340
       Stack trace:
       #0 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-product.php(1340): in_array()
       #1 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(324): MVX_Product->convert_business_id_to_taxonomy_term_in_query()
       #2 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
       #3 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action()
       #4 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-query.php(1881): do_action_ref_array()
       #5 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-query.php(3824): WP_Query->get_posts()
       #6 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-query.php(3956): WP_Query->query()
       #7 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/src/Blocks/AIContent/PatternsHelper.php(45): WP_Query->__construct()
       #8 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/src/Blocks/AIContent/PatternsHelper.php(109): Automattic\WooCommerce\Blocks\AIContent\PatternsHelper::get_patterns_ai_data_post()
       #9 /var/www/vhosts/yobitos.com/httpdocs/wp-content/plugins/woocommerce/src/Blocks/BlockPatterns.php(133): Automattic\WooCommerce\Blocks\AIContent\PatternsHelper::get_patterns_dictionary()
       #10 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Blocks\BlockPatterns->register_block_patterns()
       #11 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
       #12 /var/www/vhosts/yobitos.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
       #13 /var/www/vhosts/yobitos.com/httpdocs/wp-settings.php(643): do_action()
       #14 /var/www/vhosts/yobitos.com/httpdocs/wp-config.php(87): require_once('...')
       #15 /var/www/vhosts/yobitos.com/httpdocs/wp-load.php(50): require_once('...')
       #16 /var/www/vhosts/yobitos.com/httpdocs/wp-admin/admin.php(34): require_once('...')
       #17 /var/www/vhosts/yobitos.com/httpdocs/wp-admin/edit.php(10): require_once('...')
       #18 {main}
         thrown
       ```
   
 * Thank you!
 *  Plugin Support [mouindi](https://wordpress.org/support/users/mouindi/)
 * (@mouindi)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17703287)
 * Hi [@trust17](https://wordpress.org/support/users/trust17/), sorry to hear that
   you are still facing this issue.
 * As we are still not able to locate any error within this code, can you please
   contact us over our forum, so we can debug this issue further. Here is our forum
   link : [https://multivendorx.com/support-forum/](https://multivendorx.com/support-forum/)
 * Let us know if you need any further help.

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

The topic ‘Problem plugin PHP’ is closed to new replies.

 * ![](https://ps.w.org/dc-woocommerce-multi-vendor/assets/icon-256x256.gif?rev=
   3314608)
 * [MultiVendorX - WooCommerce Multivendor Marketplace AI Powered Solutions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dc-woocommerce-multi-vendor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/)
 * [Active Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/)

## Tags

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

 * 7 replies
 * 2 participants
 * Last reply from: [mouindi](https://wordpress.org/support/users/mouindi/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/problem-plugin-php/#post-17703287)
 * Status: resolved