Skip to content

Commit c80ce30

Browse files
author
Anton Shevchuk
committed
Added compatability PHP 8.0 for Db\Table
1 parent b40e303 commit c80ce30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Db/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public static function findWhere(...$where): array
293293
$whereAndTerms[] = $self->name . '.' . $keyName . ' IN (' . $keyValue . ')';
294294
} elseif (null === $keyValue) {
295295
$whereAndTerms[] = $self->name . '.' . $keyName . ' IS NULL';
296-
} elseif (is_string($keyValue) && ('%' === $keyValue{0} || '%' === $keyValue{-1})) {
296+
} elseif (is_string($keyValue) && ('%' === substr($keyValue, 0, 1) || '%' === substr($keyValue, -1, 1))) {
297297
$whereAndTerms[] = $self->name . '.' . $keyName . ' LIKE ?';
298298
$whereParams[] = $keyValue;
299299
} else {

0 commit comments

Comments
 (0)