Skip to content

Commit 8c29c45

Browse files
mlocatidshafik
authored andcommitted
Avoid deprecated array access syntax (#47)
1 parent dc3060b commit 8c29c45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mysql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function mysql_connect(
5353
$hash = sha1($hostname . $username . $flags);
5454
/* persistent connections start with p: */
5555
/* don't use a cached link for those */
56-
if (!$new && $hostname{1} !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) {
56+
if (!$new && $hostname[1] !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) {
5757
\Dshafik\MySQL::$last_connection = \Dshafik\MySQL::$connections[$hash]['conn'];
5858
\Dshafik\MySQL::$connections[$hash]['refcount'] += 1;
5959
return \Dshafik\MySQL::$connections[$hash]['conn'];
@@ -735,7 +735,7 @@ public static function escapeString($unescapedString)
735735
{
736736
$escapedString = '';
737737
for ($i = 0, $max = strlen($unescapedString); $i < $max; $i++) {
738-
$escapedString .= self::escapeChar($unescapedString{$i});
738+
$escapedString .= self::escapeChar($unescapedString[$i]);
739739
}
740740

741741
return $escapedString;

0 commit comments

Comments
 (0)