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

Problem if magic_quotes_runtime is turned On

 
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
fthylmann
Smarty n00b


Joined: 14 Nov 2004
Posts: 1
Location: Internet

PostPosted: Sun Nov 14, 2004 5:55 pm    Post subject: Problem if magic_quotes_runtime is turned On Reply with quote

Hi everyone.

I just found a problem when magic_quotes_runtime is turned On in PHP. This will cause, at least on some versions of PHP, the _read_file function to read the template with " and ' escaped. This in turn breaks the parsing of tags like

{assign var="foo" value="bar"}

Because the " are escaped to {assign var=\"foo\" value=\"bar\"}

I am not sure why this has been reported earlier, but it might be depending on the version of the regex system used if this actually breaks the parsing totally or not.

My fix on the system in question, which in my oppinion should not be a problem, is to simply add the following line after the fclose($fd) in _read_file():

if (get_magic_quotes_runtime()) $contents = stripslashes($contents);
_________________
-- Fabian Thylmann
-- Too Much Media LLC
-- NATS - Next-generation Administration & Tracking System
Back to top
View user's profile Send private message Visit poster's website AIM Address
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Nov 14, 2004 10:00 pm    Post subject: Reply with quote

I'm not sure where, but I think it is documented somewhere -- anyways, magic_quotes_runtime is not supported.
Back to top
View user's profile Send private message
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