Skip to content

Commit 2c0ec23

Browse files
Merge pull request #8373 from MissAllSunday/php7_support_strpos
2 parents b9e0009 + 5d7f7ab commit 2c0ec23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Subs-Db-mysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ function smf_db_insert($method, $table, $columns, $data, $keys, $returnmode = 0,
844844

845845
foreach ($columns as $column_name => $type)
846846
{
847-
if (str_contains($type, 'string-'))
847+
if (strpos($type, 'string-') !== false)
848848
$where_string[] = $column_name . ' = ' . sprintf('SUBSTRING({string:%1$s}, 1, ' . substr($type, 7) . ')', $column_name);
849849
else
850850
$where_string[] = $column_name . ' = ' . sprintf('{%1$s:%2$s}', $type, $column_name);

0 commit comments

Comments
 (0)