Page 1 of 1

Error #26 in Mantis 2.15.0

Posted: Jun 11, 2018 5:11 pm
by mushu
Site Information
MantisBT Version 2.15.0
Schema Version 209
PHP Version 5.6.31
Database Driver mysqli
Database Version, Description 5.7.13, 5.7.13-log
Site Path C:\MantisBT2150\
Core Path C:\MantisBT2150\core\
Plugin Path C:\MantisBT2150\plugins\
.
mantis-bug1 (Medium).jpg
mantis-bug1 (Medium).jpg (113.93 KiB) Viewed 1780 times
.
User is "Developer" using Chrome was in "View issues" and tried to click on issue created by different person "Reporter" who had used IE 11 to create new tickets manually (not via email.) Every ticket created by IE 11 user causes crash by this Developer when he tries to access it, but myself as "Administrator" can open those tickets without errors. Problem still exists when developer refreshes browser window via [ctrl-F5] to force server reload.

Re: Error #26 in Mantis 2.15.0

Posted: Jun 12, 2018 1:23 am
by atrol
I am not able to reproduce.

Are you able to provide step by step instructions to reproduce the issue on a fresh Mantis install without any 3rd party plugins?

I have a certain feeling that there could be a bug in a 3rd party plugin you use.
On a screen shot of another post from you, I see that you are using a plugin adLogin.
Do you get the same issue when disabling the plugin?

I am pretty sure your issue is fixed by changing line 1060 in core/html_api.php
from

Code: Select all

	$t_current_user_id = auth_get_current_user_id();
to

Code: Select all

	$t_current_user_id = (int)auth_get_current_user_id();
But this would just be a workaround, hiding another bug and not a solution,

Re: Error #26 in Mantis 2.15.0

Posted: Jun 12, 2018 10:27 am
by mushu
Ahhhh yes. I remember now. I made that patch and missed the file being edited when I upgraded our DEV instance. Thanks for the reminder, yes that fixes the error, but I agree that the ADlogin module might be the issue. Thanks!

Re: Error #26 in Mantis 2.15.0

Posted: Jun 12, 2018 11:46 am
by atrol
mushu wrote:
Jun 12, 2018 10:27 am
but I agree that the ADlogin module might be the issue. Thanks!
Maybe this explains also the root cause of Error #26 from https://mantisbt.org/forums/viewtopic.php?f=3&t=25627

Re: Error #26 in Mantis 2.15.0

Posted: Jun 12, 2018 11:56 am
by mushu
I doubt it because that was in our Production environment and the html_api.php patch has been done to that already.

Re: Error #26 in Mantis 2.15.0

Posted: Jun 12, 2018 12:31 pm
by atrol
There is more than one place where a bug in a plugin can cause error #26.

Re: Error #26 in Mantis 2.15.0

Posted: Jun 14, 2018 4:09 pm
by mushu
@atrol I'm just wondering what part of my original screenshot "stack trace" told you which file and line needed to be patched? I don't have much PHP coding knowledge, so I'm hoping you can share some wisdom with me so i can be more self-sufficient for future crashes.

Re: Error #26 in Mantis 2.15.0

Posted: Jun 15, 2018 4:14 pm
by atrol
No wisdom, quite simple.

Line #1 tells what's going wrong: Comparison of integer with string (string does not make sense for the user id)
Line #2 tells where it's called: Just look where the 2nd parameter has been set before