Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Mar 22, 2024
1 parent 1b91f56 commit 120e312
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Psalm/Type/Atomic/TKeyedArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@ private function escapeAndQuote($name)
$quote = true;
}

// 08 should be quoted since it's numeric but it's handled as string and not cast to int
if (preg_match('/^0[0-9]+$/', $name)) {
$quote = true;
}

if ($quote) {
$name = '\'' . str_replace("\n", '\n', addslashes($name)) . '\'';
}
Expand Down

0 comments on commit 120e312

Please sign in to comment.