diff --git a/SqlBuilder.php b/SqlBuilder.php index 6813e46..c33fbcd 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -186,10 +186,8 @@ class SqlBuilder extends Component if (is_null($value)) { return $keys; } - if ( - str_starts_with($value, '+ ') || - str_starts_with($value, '- ') - ) { + if (is_string($value) && (str_starts_with($value, '+ ') || + str_starts_with($value, '- '))) { $keys[] = $key . '=' . $key . ' ' . $value; } else { $this->query->bindParam(':update' . $key . $order, $value);