Re: Found some incompatibilities

"Jan Rosier" <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <001801c401d0$ce867480$8f00a8c0@victoria>
messju mohr wrote:
> On Wed, Mar 03, 2004 at 10:39:56AM +0100, Jan Rosier wrote:
>>>> On another note: While I looked at _read_file() I noticed that it
>>>> provides functionality to read only sub-parts of a file (only
>>>> $n..$m lines). But this functionality is never used from withing
>>>> Smarty. We could save about 20 lines in core Smarty.class.php if
>>>> we abandon this unused feature.
>>>
>>> Personally, I'd vote to remove those unused lines.
>>>
>>
>> Me too and when we add the following code. The whole function
>> _read_file(...) could be replaced with file_get_contents($file)
>>
.........<snip>
>>
>
> I like that approach. We should return boolean false if the fopen
> fails, though (as the native file_get_contents() does).
>
> There are just two things that make me feel uncomfortable:
>
.........<snip>
>
> #2 we should also change fread() in Config_File.class.php to
> file_get_contents() if we go for this approach. Config_File is known
> to be usable outside of Smarty. If smarty defines it's own
> file_get_contents() for older php-versions, than Config_File would
> break without Smarty and older php versions.
>

This can be fixed if we add the attached file to the distribution and add
the following line to Config_File.class.php and Smarty.class.php

require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Smarty.bc.php');

Greetings,
Jan Rosier

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.