Skip to content

Commit

Permalink
Merge pull request #8373 from MissAllSunday/php7_support_strpos
Browse files Browse the repository at this point in the history
  • Loading branch information
Sesquipedalian authored Dec 25, 2024
2 parents b9e0009 + 5d7f7ab commit 2c0ec23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Subs-Db-mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ function smf_db_insert($method, $table, $columns, $data, $keys, $returnmode = 0,

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

0 comments on commit 2c0ec23

Please sign in to comment.