Skip to content

Commit 8cc9625

Browse files
committed
fix: builder
1 parent 3b85b2c commit 8cc9625

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Builders/EncryptionEloquentBuilder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function whereEncryptedConcat($param1, $param2, $param3 = null)
5454
$concat = 'CONCAT(';
5555
foreach ($filter->fields as $i => $field) {
5656
$concat .= "CONVERT(AES_DECRYPT(FROM_BASE64(`{$field}`), '{$this->salt}') USING utf8mb4)";
57-
if ($i < count($filter->fields)) {
57+
if ($i + 1 < count($filter->fields)) {
5858
$concat .= ", ' ', ";
5959
}
6060
}
@@ -74,7 +74,7 @@ public function orWhereEncryptedConcat($param1, $param2, $param3 = null)
7474
$concat = 'CONCAT(';
7575
foreach ($filter->fields as $i => $field) {
7676
$concat .= "CONVERT(AES_DECRYPT(FROM_BASE64(`{$field}`), '{$this->salt}') USING utf8mb4)";
77-
if ($i < count($filter->fields)) {
77+
if ($i + 1 < count($filter->fields)) {
7878
$concat .= ", ' ', ";
7979
}
8080
}

0 commit comments

Comments
 (0)