Skip to content

Commit 6450a63

Browse files
committed
Fix curly braces offset syntax
1 parent 0ed774b commit 6450a63

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ RDBMS support for the XP Framework: MySQL, Sybase, MSSQL, PostgreSQL, SQLite3, I
33

44
## ?.?.? / ????-??-??
55

6+
## 13.0.1 / 2020-10-04
7+
8+
* Fixed "Array and string offset access syntax with curly braces is no
9+
longer supported"
10+
(@thekid)
11+
612
## 13.0.0 / 2020-04-10
713

814
* Implemented xp-framework/rfc#334: Drop PHP 5.6:

src/main/php/rdbms/finder/Finder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function method($name) {
146146
*
147147
* @return rdbms.Criteria
148148
*/
149-
#[@finder(['kind' => COLLECTION])]
149+
#[Finder(kind: COLLECTION)]
150150
public function all() {
151151
return new \rdbms\Criteria();
152152
}

src/main/php/rdbms/tds/TdsDataStream.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct($sock, $packetSize= 512) {
4545
protected static function chars($bytes, $offset) {
4646
$s= '';
4747
for ($j= $offset- 16, $l= min($offset, strlen($bytes)); $j < $l; $j++) {
48-
$c= $bytes{$j};
48+
$c= $bytes[$j];
4949
$s.= $c < "\x20" || $c > "\x7F" ? ' ' : $c;
5050
}
5151
return $s;
@@ -70,7 +70,7 @@ protected static function dump($bytes) {
7070
} else if (0 === ($i % 16)) {
7171
$s.= sprintf("|%s|\n%3d: ", self::chars($bytes, $i), $i);
7272
}
73-
$s.= sprintf('%02X ', ord($bytes{$i}));
73+
$s.= sprintf('%02X ', ord($bytes[$i]));
7474
}
7575
return $s;
7676
}

0 commit comments

Comments
 (0)