Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPStan: fix three errors #257

Closed
wants to merge 1 commit into from

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Aug 11, 2020

A build against master currently shows the following errors:

 ------ -------------------------------------------------------
  Line   module.misc.torrent.php
 ------ -------------------------------------------------------
  124    Undefined variable: $char
  151    Variable $info_dictionary_start might not be defined.
  151    Variable $info_dictionary_start might not be defined.
 ------ -------------------------------------------------------

I believe the changes in this commit will fix these without affecting functionality.

A build against `master` currently shows the following errors:
```
 ------ -------------------------------------------------------
  Line   module.misc.torrent.php
 ------ -------------------------------------------------------
  124    Undefined variable: $char
  151    Variable $info_dictionary_start might not be defined.
  151    Variable $info_dictionary_start might not be defined.
 ------ -------------------------------------------------------
```

I believe the changes in this commit will fix these without affecting functionality.
Copy link
Owner

@JamesHeinrich JamesHeinrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line 124 change of $char to $value is fine, but the $info_dictionary_start change will break functionality: the value must be set before the call to $this->NextEntity (which walks through and increments the $offset value).

JamesHeinrich added a commit that referenced this pull request Aug 11, 2020
@JamesHeinrich
Copy link
Owner

Fix applied in 07af99b so this PR no longer required (but thank you).

@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 11, 2020

the value must be set before the call to $this->NextEntity (which walks through and increments the $offset value).

@JamesHeinrich Ah! Thanks for catching that. I hadn't dug in that deep, just tried to address the immediate flagged issue.

@jrfnl jrfnl deleted the feature/fix-phpstan branch August 11, 2020 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants