ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on June 23, 2014, 02:03:42 pm

Title: errors in the log
Post by: emanuele on June 23, 2014, 02:03:42 pm
Code: [Select]
Guest
http://www.elkarte.net/community/index.php?PHPSESSID=s9e370jf50bq5jpd671od7sll5&?scheduled=task;ts=1403438400
File: /.../community/sources/subs/Boards.subs.php
Line: 1622
This is rather odd.

There is no IP, no type of error, no error message, so it's a bit difficult to track it down.

Line 1622 is the query of the functions boardsModerated.
This is called probably from memberQuerySeeBoard that is used in a scheduled task: user_access_mentions.

The only thing that I could trigger an error there I think it's a wrong $id_member passed.
A 0 should not trigger an error (the query would return an empty result I think).
So a false/null? Or a string? But why? And why an error without anything else?
No idea. :(

ETA: okay, I did some more tests.
Running the scheduled task manually I can see a query error and an undefined index in the scheduled task class, though... it's even more odd.

Code: [Select]
				$user_see_board = memberQuerySeeBoard($row['id_member']);
log_error(implode(', ', array_keys($row)) . '<br />' . implode(', ', array_values($row)) . '<br />' . $row['id_member']);
This code, logs properly $row['id_member'], but the line just above generates an undefined index error 'id_member'
And it fails only when re-counting [SiNaN]'s mentions... LOL
Title: Re: errors in the log
Post by: Spuds on June 23, 2014, 04:04:57 pm
Is using $request on the outer loop and then creating a new $request on the inner loop intended ?
Title: Re: errors in the log
Post by: emanuele on June 23, 2014, 04:18:04 pm
/me feels pretty dumb... :-[ LOL
Title: Re: errors in the log
Post by: Spuds on June 23, 2014, 08:40:26 pm
LOL I kept looking for references and then saw that and was like hummm, that does not seem right :P
Title: Re: errors in the log
Post by: emanuele on June 25, 2014, 04:41:04 pm
https://github.com/emanuele45/Dialogo/commit/98c04c994d3397adea23c18c81d11fec7fd0ff2c
Title: Re: errors in the log
Post by: [SiNaN] on July 11, 2014, 07:53:56 am
Quote from: emanuele – And it fails only when re-counting [SiNaN]'s mentions... LOL

That's what you get for using me as a test subject all the time. :P

It seems like I finally have my mentions counter fixed though. Thanks!
Title: Re: errors in the log
Post by: emanuele on July 11, 2014, 02:40:21 pm
YAY! :D