Skip to content

Commit 7c4e89a

Browse files
committed
Fix "Using null as an array offset is deprecated, use an empty string instead"
1 parent aae68be commit 7c4e89a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ XP Compiler ChangeLog
33

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

6+
* Fixed the warning *Using null as an array offset is deprecated, use an
7+
empty string instead* in PHP 8.5+
8+
(@thekid)
69
* Fixed the error *Arrow functions on the right hand side of |> must be
710
parenthesized* - see https://externals.io/message/128473#128554
811
(@thekid)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function annotations($result, $annotations, $resolve= null) {
3232
} else if (1 === sizeof($arguments) && isset($arguments[0])) {
3333
$this->emitOne($result, $arguments[0]);
3434
$result->out->write(',');
35-
$lookup[$name][$resolve]= 1; // Resolve ambiguity
35+
$lookup[$name][$resolve ?? '']= 1; // Resolve ambiguity
3636
} else {
3737
$result->out->write('[');
3838
foreach ($arguments as $name => $argument) {

0 commit comments

Comments
 (0)