Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 11, 2025

Description

Prevent an "Undefined array index" PHP notice when running in debug mode when there are no scopes left.

Issue can be reproduced by running:

phpcs ./src/Runner.php --runtime-set scope_indent_debug 1

Suggested changelog entry

Fixed: Generic.WhiteSpace.ScopeIndent: undefined array index notice when running in debug mode

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Prevent an "Undefined array index" PHP notice when running in debug mode when there are no scopes left.

Issue can be reproduced by running:
```bash
phpcs ./src/Runner.php --runtime-set scope_indent_debug 1
```
@jrfnl jrfnl added this to the 3.12.2 milestone Apr 11, 2025
@jrfnl jrfnl merged commit f259845 into master Apr 13, 2025
62 of 64 checks passed
@jrfnl jrfnl deleted the feature/generic-scopeindent-prevent-undefined-index-notice-debug-mode branch April 13, 2025 01:30
@jrfnl jrfnl mentioned this pull request Apr 18, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant