From 96236f66d331f6a68515bf1131a378ddae2387c6 Mon Sep 17 00:00:00 2001 From: "E. S." Date: Sat, 9 Mar 2024 16:52:57 +0000 Subject: [PATCH] mysql: minor code changes --- engine/mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/mysql.php b/engine/mysql.php index 0978fdd..cda4c7a 100644 --- a/engine/mysql.php +++ b/engine/mysql.php @@ -14,7 +14,7 @@ class mysql { global $config; if (!empty($args)) { $mark_count = substr_count($sql, '?'); - $positions = array(); + $positions = []; $last_pos = -1; for ($i = 0; $i < $mark_count; $i++) { $last_pos = strpos($sql, '?', $last_pos + 1); @@ -25,7 +25,7 @@ class mysql { if (is_null($arg_val)) { $v = 'NULL'; } else { - $v = '\''.$this->escape($arg_val) . '\''; + $v = '\''.$this->escape($arg_val).'\''; } $sql = substr_replace($sql, $v, $positions[$i], 1); }