• Hello everyone,

    Someone can help me about this error? Thanks for any help.

    Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/conditions.php:46 Stack trace: #0 /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/conditions.php(46): in_array() #1 /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/conditions.php(99): Elementor\Conditions::compare() #2 /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/conditions.php(83): Elementor\Conditions::check() #3 /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/base/controls-stack.php(1438): Elementor\Conditions::check() #4 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(938): Elementor\Controls_Stack->is_control_visible() #5 [internal function]: Elementor\Core\Files\CSS\Base->Elementor\Core\Files\CSS\{closure}() #6 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(934): array_reduce() #7 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(950): Elementor\Core\Files\CSS\Base->get_active_controls() #8 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(315): Elementor\Core\Files\CSS\Base->get_style_controls() #9 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles() #10 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(226): Elementor\Core\Files\CSS\Post->render_styles() #11 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(313): Elementor\Core\Files\CSS\Post->add_controls_stack_style_rules() #12 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles() #13 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(226): Elementor\Core\Files\CSS\Post->render_styles() #14 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(313): Elementor\Core\Files\CSS\Post->add_controls_stack_style_rules() #15 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles() #16 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(226): Elementor\Core\Files\CSS\Post->render_styles() #17 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(313): Elementor\Core\Files\CSS\Post->add_controls_stack_style_rules() #18 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles() #19 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(178): Elementor\Core\Files\CSS\Post->render_styles() #20 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(687): Elementor\Core\Files\CSS\Post->render_css() #21 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/base.php(180): Elementor\Core\Files\CSS\Base->parse_content() #22 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(133): Elementor\Core\Files\Base->update_file() #23 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/base.php(229): Elementor\Core\Files\CSS\Base->update() #24 /home7/porta6706991/public_html/wp-content/plugins/elementor/core/files/css/post.php(201): Elementor\Core\Files\CSS\Base->enqueue() #25 /home7/porta6706991/public_html/wp-content/plugins/elementor/includes/frontend.php(700): Elementor\Core\Files\CSS\Post->enqueue() #26 /home7/porta6706991/public_html/wp-content/plugins/elementor-pro/modules/theme-builder/classes/locations-manager.php(190): Elementor\Frontend->enqueue_styles() #27 /home7/porta6706991/public_html/wp-includes/class-wp-hook.php(324): ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager->enqueue_styles() #28 /home7/porta6706991/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #29 /home7/porta6706991/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #30 /home7/porta6706991/public_html/wp-includes/script-loader.php(2272): do_action() #31 /home7/porta6706991/public_html/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts() #32 /home7/porta6706991/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #33 /home7/porta6706991/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #34 /home7/porta6706991/public_html/wp-includes/general-template.php(3064): do_action() #35 /home7/porta6706991/public_html/wp-content/themes/generatepress/header.php(16): wp_head() #36 /home7/porta6706991/public_html/wp-includes/template.php(810): require_once(‘/home7/porta670…’) #37 /home7/porta6706991/public_html/wp-includes/template.php(745): load_template() #38 /home7/porta6706991/public_html/wp-includes/general-template.php(48): locate_template() #39 /home7/porta6706991/public_html/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(9): get_header() #40 /home7/porta6706991/public_html/wp-includes/template-loader.php(106): include(‘/home7/porta670…’) #41 /home7/porta6706991/public_html/wp-blog-header.php(19): require_once(‘/home7/porta670…’) #42 /home7/porta6706991/public_html/index.php(17): require(‘/home7/porta670…’) #43 {main} thrown in?/home7/porta6706991/public_html/wp-content/plugins/elementor/includes/conditions.php?on line?46

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter artesanu

    (@artesanu)

    This is the file conditions.php

    <?php
    namespace Elementor;

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly.
    }

    /**

    • Elementor conditions.
      *
    • Elementor conditions handler class introduce the compare conditions and the
    • check conditions methods.
      *
    • @since 1.0.0
      */
      class Conditions { /**
      • Compare conditions.
        *
      • Whether the two values comply the comparison operator.
        *
      • @since 1.0.0
      • @access public
      • @static
        *
      • @param mixed $left_value First value to compare.
      • @param mixed $right_value Second value to compare.
      • @param string $operator Comparison operator.
        *
      • @return bool Whether the two values complies the comparison operator.
        */
        public static function compare( $left_value, $right_value, $operator ) {
        switch ( $operator ) {
        case ‘==’:
        return $left_value == $right_value;
        case ‘!=’:
        return $left_value != $right_value;
        case ‘!==’:
        return $left_value !== $right_value;
        case ‘in’:
        return in_array( $left_value, $right_value, true );
        case ‘!in’:
        return ! in_array( $left_value, $right_value, true );
        case ‘contains’:
        return in_array( $right_value, $left_value, true );
        case ‘!contains’:
        return ! in_array( $right_value, $left_value, true );
        case ‘<‘: return $left_value < $right_value; case ‘<=’: return $left_value <= $right_value; case ‘>’:
        return $left_value > $right_value;
        case ‘>=’:
        return $left_value >= $right_value;
        default:
        return $left_value === $right_value;
        }
        }
      /**
      • Check conditions.
        *
      • Whether the comparison conditions comply.
        *
      • @since 1.0.0
      • @access public
      • @static
        *
      • @param array $conditions The conditions to check.
      • @param array $comparison The comparison parameter.
        *
      • @return bool Whether the comparison conditions comply.
        */
        public static function check( array $conditions, array $comparison ) {
        $is_or_condition = isset( $conditions[‘relation’] ) && ‘or’ === $conditions[‘relation’]; $condition_succeed = ! $is_or_condition; foreach ( $conditions[‘terms’] as $term ) {
        if ( ! empty( $term[‘terms’] ) ) {
        $comparison_result = self::check( $term, $comparison );
        } else {
        preg_match( ‘/(\w+)(?:[(\w+)])?/’, $term[‘name’], $parsed_name ); $value = $comparison[ $parsed_name[1] ];if ( ! empty( $parsed_name[2] ) ) { $value = $value[ $parsed_name[2] ]; } $operator = null; if ( ! empty( $term['operator'] ) ) { $operator = $term['operator']; } $comparison_result = self::compare( $value, $term['value'], $operator );} if ( $is_or_condition ) { if ( $comparison_result ) { return true; } } elseif ( ! $comparison_result ) { return false; } } return $condition_succeed;
        }
        }

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.