summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichele Locati <michele@locati.it>2019-12-03 16:00:26 +0100
committerDavey Shafik <me@daveyshafik.com>2019-12-03 07:00:26 -0800
commit8c29c45a2e21f5b3745d0a0b42f7af71ead9579d (patch)
treec175da816bfdf0e73eb1e6aee9a62f15f8432984 /lib
parentdc3060b802bd1c8e819efe0236813d67375fba90 (diff)
downloadphp7-mysql-shim-8c29c45a2e21f5b3745d0a0b42f7af71ead9579d.zip
php7-mysql-shim-8c29c45a2e21f5b3745d0a0b42f7af71ead9579d.tar.gz
php7-mysql-shim-8c29c45a2e21f5b3745d0a0b42f7af71ead9579d.tar.bz2
Avoid deprecated array access syntax (#47)
Diffstat (limited to 'lib')
-rw-r--r--lib/mysql.php4
1 files 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;