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

Off-by-one in sections/userhistory/post_history.php #89

Open
MrPMan opened this issue Dec 24, 2015 · 0 comments
Open

Off-by-one in sections/userhistory/post_history.php #89

MrPMan opened this issue Dec 24, 2015 · 0 comments

Comments

@MrPMan
Copy link

MrPMan commented Dec 24, 2015

sections/userhistory/post_history.php: line 216 expects l.PostID for $LastRead, which is only selected if $UserID is $LoggedUser['ID'] and grouping is disabled

Line 216 of sections/userhistory/post_history.php expects l.PostID for $LastRead, but, as shown in lines 108-111, it is possible for l.PostID to not be selected from the database. A simple solution would be to select l.PostID last, so the undefined offset will simply result in $LastRead being null.

MrPMan added a commit to MrPMan/Gazelle that referenced this issue Dec 24, 2015
Possible off-by-one.
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

No branches or pull requests

1 participant