RTO-Websites / dynamic-conditions

A simple plugin to show/hide elementor-widgets based on dynamic tags
52 stars 17 forks source link

PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string #56

Closed Sockitos closed 3 months ago

Sockitos commented 2 years ago

Hello,

My hosting service recently updated the PHP version to 7.4 and I started having some errors with Dynamic Conditions. One of them is this PHP fatal error which happens any time I try to update a page through the elementor editor. I've seen this error being referenced in some forums but without any answer.

Is this a known error? And is there anything I can do to fix it?

Thank you very much!

[21-Mar-2022 09:03:09 UTC] PHP Fatal error:  Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home1/planetho/public_html/cmuportugal/wp-content/plugins/dynamicconditions/Public/DynamicConditionsPublic.php:198
Stack trace:
#0 /home1/planetho/public_html/cmuportugal/wp-content/plugins/dynamicconditions/Public/DynamicConditionsPublic.php(198): explode(' name="', Array)
#1 /home1/planetho/public_html/cmuportugal/wp-content/plugins/dynamicconditions/Public/DynamicConditionsPublic.php(147): DynamicConditions\Pub\DynamicConditionsPublic->getDynamicTagData('850980a')
#2 /home1/planetho/public_html/cmuportugal/wp-content/plugins/dynamicconditions/Public/DynamicConditionsPublic.php(311): DynamicConditions\Pub\DynamicConditionsPublic->getElementSettings(Object(Elementor\Widget_Spacer))
#3 /home1/planetho/public_html/cmuportugal/wp-includes/class-wp-hook.php(303): DynamicConditions\Pub\DynamicConditionsPublic->filterSectionContentBefore(Object(Elementor\Widget_Spacer))
#4 /home1/planetho/public_html/cmuportugal/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#5 /home1/planetho/public_html/cmuportugal/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#6 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(438): do_action('elementor/front...', Object(Elementor\Widget_Spacer))
#7 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\Element_Base->print_element()
#8 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\Element_Base->print_content()
#9 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\Element_Base->print_element()
#10 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\Element_Base->print_content()
#11 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\Element_Base->print_element()
#12 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\Element_Base->print_content()
#13 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(741): Elementor\Element_Base->print_element()
#14 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/base/element-base.php(447): Elementor\Element_Base->print_content()
#15 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/core/base/document.php(1529): Elementor\Element_Base->print_element()
#16 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/core/base/document.php(1002): Elementor\Core\Base\Document->print_elements(Array)
#17 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/frontend.php(1092): Elementor\Core\Base\Document->print_elements_with_wrapper(Array)
#18 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/includes/frontend.php(1006): Elementor\Frontend->get_builder_content(37276)
#19 /home1/planetho/public_html/cmuportugal/wp-includes/class-wp-hook.php(303): Elementor\Frontend->apply_builder_in_content('<h1>BEE2WasteCr...')
#20 /home1/planetho/public_html/cmuportugal/wp-includes/plugin.php(189): WP_Hook->apply_filters('<h1>BEE2WasteCr...', Array)
#21 /home1/planetho/public_html/cmuportugal/wp-includes/post-template.php(253): apply_filters('the_content', '<h1>BEE2WasteCr...')
#22 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/modules/page-templates/module.php(190): the_content()
#23 [internal function]: Elementor\Modules\PageTemplates\Module->print_callback()
#24 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/modules/page-templates/module.php(207): call_user_func(Array)
#25 /home1/planetho/public_html/cmuportugal/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(19): Elementor\Modules\PageTemplates\Module->print_content()
#26 /home1/planetho/public_html/cmuportugal/wp-includes/template-loader.php(106): include('/home1/planetho...')
#27 /home1/planetho/public_html/cmuportugal/wp-blog-header.php(19): require_once('/home1/planetho...')
#28 /home1/planetho/public_html/cmuportugal/index.php(17): require('/home1/planetho...')
#29 {main}
  thrown in /home1/planetho/public_html/cmuportugal/wp-content/plugins/dynamicconditions/Public/DynamicConditionsPublic.php on line 198
adxmeliora commented 2 years ago

Hey, did you get any fix for this? Currently facing a similar issue

Warning: Array to string conversion in /var/web/site/public_html/wp-content/plugins/elementor/data/v2/manager.php on line 355 Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /var/web/site/public_html/wp-content/plugins/elementor/data/v2/manager.php:116

Elementor Support have washed their hands of it...

crazypsycho commented 1 year ago

I cannnot reproduce this issue. Can you explain what you exactly set up in dynamic-conditions?