-
Notifications
You must be signed in to change notification settings - Fork 84
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
Bug: method monthNo() from class MDBbase should check if empty result #259
Comments
Presumably the real bug here is that it's trying to use 2009 as a month |
The bug? You mean, in my code? |
In your description you put "Undefined index: 2009" which is surely referring to trying to do |
Hi there, I execute the method |
Like @tboothman said the real problem here is that some interviews don't start with a date but with a year like jorge rivero but others too. (Jack Nicholson) |
I'm working on this to fix it, there are a lot of problems with parsearticles() |
@jcvignoli can you test my PR to ensure it works correctly? |
@duck7000 it works! :) |
Thanks for testing! |
Still waiting for this to be reviewed/merged |
Too bad for you i closed this PR, i have enough of the lax attitude here. |
Hope it will be included in a next release! |
I doubt it.. |
Description
method monthNo() in MDBbase doesn't check if it gets an empty result before sending data to Person class.
This results in a undefined index php notice if empty:
int(8) string(22) "Undefined index: 2009," string(124) "Imdb/MdbBase.php" int(171) array(1) { ["mon"]=> string(5) "2009," }
Movies / TV-Shows / Person
Jorge Rivero, nm0729473, when using interviews() method
Comment
method monthNo() hides its failures behind a "@", this is a bad practice.
Proposal for fixing
I'm not an experienced developper at all and I lack of basic php knowldege, but I'd like to suggest a fix anyway:
The text was updated successfully, but these errors were encountered: