diff --git a/src/Setting.php b/src/Setting.php index c2d37a7..9cd7816 100644 --- a/src/Setting.php +++ b/src/Setting.php @@ -263,7 +263,8 @@ protected function getConstraintValue($constraint_value) */ protected function getConstraintQuery($constraint_value) { - return $this->custom_constraint ?: $this->constraint_key . ' = ' . $constraint_value; + $theValue = is_numeric($constraint_value) ? $constraint_value : "'$constraint_value'"; + return $this->custom_constraint ?: "$this->constraint_key = $theValue"; } }