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

Fix PHP notice in WikiFile::getInfo() (fixes #84) #85

Merged
merged 3 commits into from
Mar 13, 2017

Conversation

Xymph
Copy link
Collaborator

@Xymph Xymph commented Mar 12, 2017

See #84.

@Xymph Xymph force-pushed the 84-fix-getinfo-notice branch from 6a5acd0 to 8cc4898 Compare March 12, 2017 13:15
@Xymph Xymph mentioned this pull request Mar 13, 2017
Wikimate.php Outdated
@@ -1097,7 +1097,7 @@ public function getInfo($refresh = false, $history = null)

$this->edittoken = $page['edittoken'];

if (!isset($page['missing'])) {
if (!isset($page['missing']) && isset($page['imageinfo'])) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think a comment would be warranted above this line? I'm not sure the behavior you described in #84 is intuitive:

when a file existed but was subsequently deleted or moved to another path, that the MW API does not return the missing property for the requested path anymore. I guess it only does that when the path never existed in the first place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good point - done.

@waldyrious
Copy link
Collaborator

LGTM. Feel free to do any commit cleanup if you feel it's worth it, and merge whenever you're ready.

@Xymph Xymph force-pushed the 84-fix-getinfo-notice branch from 6fbc6a7 to e7022dc Compare March 13, 2017 13:01
@Xymph Xymph merged commit b7dabd8 into hamstar:master Mar 13, 2017
@Xymph
Copy link
Collaborator Author

Xymph commented Mar 13, 2017

I fixed up the comment with the code change, but preserved the reference to the changelog discussion. That's a wrap. :)

@Xymph Xymph deleted the 84-fix-getinfo-notice branch March 13, 2017 13:03
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.

2 participants