JBJBJB
12-27-2005, 12:09 PM
Hello to all,
I just found the answer to a very strange problem I encountered several times. The problem was that Subdreamer started to repeat the rendering of plugins (so if I had 2 plugins defined on a page, then after the second plugin, it started to render the first plugin again etc...)
That caused problems with duplicate includes.
After about three weeks and reviewing my code multiple times, I suddenly realized that I use a variable $i in a loop which was not in a subroutine. So the scope of the $i would also be global. After I renamed the $i to something else, the repeating disappeared!!
Most certainly, the Subdreamer code to loop the plugins on a page, also uses $i as the counter for a loop!
I hope this is helpfull for others as well,
Sincerely,
Jeroen
I just found the answer to a very strange problem I encountered several times. The problem was that Subdreamer started to repeat the rendering of plugins (so if I had 2 plugins defined on a page, then after the second plugin, it started to render the first plugin again etc...)
That caused problems with duplicate includes.
After about three weeks and reviewing my code multiple times, I suddenly realized that I use a variable $i in a loop which was not in a subroutine. So the scope of the $i would also be global. After I renamed the $i to something else, the repeating disappeared!!
Most certainly, the Subdreamer code to loop the plugins on a page, also uses $i as the counter for a loop!
I hope this is helpfull for others as well,
Sincerely,
Jeroen