From 8c29c45a2e21f5b3745d0a0b42f7af71ead9579d Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 3 Dec 2019 16:00:26 +0100 Subject: Avoid deprecated array access syntax (#47) --- lib/mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mysql.php b/lib/mysql.php index 732c43a..527ba3b 100644 --- a/lib/mysql.php +++ b/lib/mysql.php @@ -53,7 +53,7 @@ namespace { $hash = sha1($hostname . $username . $flags); /* persistent connections start with p: */ /* don't use a cached link for those */ - if (!$new && $hostname{1} !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) { + if (!$new && $hostname[1] !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) { \Dshafik\MySQL::$last_connection = \Dshafik\MySQL::$connections[$hash]['conn']; \Dshafik\MySQL::$connections[$hash]['refcount'] += 1; return \Dshafik\MySQL::$connections[$hash]['conn']; @@ -735,7 +735,7 @@ namespace Dshafik { { $escapedString = ''; for ($i = 0, $max = strlen($unescapedString); $i < $max; $i++) { - $escapedString .= self::escapeChar($unescapedString{$i}); + $escapedString .= self::escapeChar($unescapedString[$i]); } return $escapedString; -- cgit v1.1