Code Duplication    Length = 11-15 lines in 2 locations

core/EE_Registry.core.php 1 location

@@ 805-815 (lines=11) @@
802
            // get the file
803
            require_once($path);
804
            // if the class isn't already declared somewhere
805
            if (class_exists($class_name, false) === false) {
806
                // so sorry, not a class
807
                throw new EE_Error(
808
                    sprintf(
809
                        __('The %s file %s does not appear to contain the %s Class.', 'event_espresso'),
810
                        $type,
811
                        $path,
812
                        $class_name
813
                    )
814
                );
815
            }
816
        } catch (EE_Error $e) {
817
            $e->get_error();
818
            return false;

core/db_models/EEM_Base.model.php 1 location

@@ 4110-4124 (lines=15) @@
4107
            }
4108
            $cleaned_value = $this->_construct_between_value($value, $field_obj);
4109
            return $operator . SP . $cleaned_value;
4110
        } elseif (in_array($operator, $this->valid_null_style_operators())) {
4111
            if ($value !== null) {
4112
                throw new EE_Error(
4113
                    sprintf(
4114
                        __(
4115
                            "You attempted to give a value  (%s) while using a NULL-style operator (%s). That isn't valid",
4116
                            "event_espresso"
4117
                        ),
4118
                        $value,
4119
                        $operator
4120
                    )
4121
                );
4122
            }
4123
            return $operator;
4124
        } elseif (in_array($operator, $this->valid_like_style_operators()) && ! is_array($value)) {
4125
            //if the operator is 'LIKE', we want to allow percent signs (%) and not
4126
            //remove other junk. So just treat it as a string.
4127
            return $operator . SP . $this->_wpdb_prepare_using_field($value, '%s');