Skip to content

Commit ff2d8c9

Browse files
committed
QA: Use [] for string offsets instead of {}, which is deprecated
1 parent fe874ce commit ff2d8c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/lang/ast/emit/PHP.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function emitCast($result, $cast) {
122122
static $native= ['string' => true, 'int' => true, 'float' => true, 'bool' => true, 'array' => true, 'object' => true];
123123

124124
$name= $cast->type->name();
125-
if ('?' === $name{0}) {
125+
if ('?' === $name[0]) {
126126
$result->out->write('cast(');
127127
$this->emitOne($result, $cast->expression);
128128
$result->out->write(',\''.$name.'\', false)');

0 commit comments

Comments
 (0)