Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

html image include bug

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
m0rd*
Smarty n00b


Joined: 27 Jul 2004
Posts: 3

PostPosted: Mon Aug 23, 2004 10:15 pm    Post subject: html image include bug Reply with quote

hey guys.
sorry but my english is not very well.
i think i found a bug in the smarty engine. this error took about 2 weeks of my life.

if you want in html to include a img with <img src="image.gif"> everything works find.
but if somewhere you include write <img src=""> (i don't even know y i forgot to include a blank.gif) your php script is executed twice...

the problem was that every $var + 1 was set +2 and i didn't find the misstake.

check it
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Aug 24, 2004 7:55 am    Post subject: Reply with quote

what does that have to do with smarty?
at best it is an Internet Explorer-"Feature".
Back to top
View user's profile Send private message Send e-mail Visit poster's website
m0rd*
Smarty n00b


Joined: 27 Jul 2004
Posts: 3

PostPosted: Tue Aug 24, 2004 10:31 pm    Post subject: Reply with quote

hmmm good question i don't use internet explorer... the problem was only tested with mozilla firefox 0.92
but i think it doesn't matter which browser u use... the problem i think is that the smarty engine "thinks" that there's a problem with the html script and gets the html file a second time.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Aug 24, 2004 11:26 pm    Post subject: Reply with quote

This is a browser behavior. If you have a blank image such as:

<img src="">

The browser will try to fetch the image "", which ends up using current script as the image, thus you see the second hit. It is no different than using a blank <form action="">, if you submit the form, it will use the current script to post the form to.

solution: supply a value for your image "src" attribute. This is not a Smarty issue.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP