Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: willyvmm on January 31, 2012, 04:27:35 PM

Title: SMF 2.0.2 "Stack overflow at line 1322"
Post by: willyvmm on January 31, 2012, 04:27:35 PM
Thereis a Bug in script.js. The bug exist on ALL  platforms, but only IE8 on XP platform shows that if you are not logged in. Other browsers just ignore that.

Code (JavaScript) Select

function addLoadEvent(fNewOnload)
{
// If there's no event set, just set this one
if (typeof(fNewOnload) == 'function' && (!('onload' in window) || typeof(window.onload) != 'function'))
window.onload = fNewOnload;

// If there's just one event, setup the array.
else if (aOnloadEvents.length == 0)
{
aOnloadEvents[0] = window.onload;
aOnloadEvents[1] = fNewOnload;
window.onload = function() {
for (var i = 0, n = aOnloadEvents.length; i < n; i++)
{
if (typeof(aOnloadEvents[i]) == 'function')
aOnloadEvents[i]();           
else if (typeof(aOnloadEvents[i]) == 'string')
eval(aOnloadEvents[i]);
}
}
}

// This isn't the first event function, add it to the list.
else
aOnloadEvents[aOnloadEvents.length] = fNewOnload;
}


In this function The array aOnloadEvents is defined, and the first
Title: Re: SMF 2.0.2 "Stack overflow at line 1322"
Post by: willyvmm on January 31, 2012, 05:29:31 PM
I've investigated this problem little bit more. This is not SMF bug, this is Jfusion(joomla integration) bug.
Title: Re: SMF 2.0.2 "Stack overflow at line 1322"
Post by: emanuele on January 31, 2012, 05:52:19 PM
Thanks for taking time to report and look into it!