Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename))

From: Date: Tue, 06 Jul 2004 16:44:40 +0000
Subject: Re: [SMARTY-DEV] [PATCH] use file_get_contents instead fread($fp, filesize($filename))
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2442@lists.php.net to get a copy of this message
On Tue, Jul 06, 2004 at 06:03:25PM +0400, Antony Dovgal wrote: > Hi! > > Small patch, which removes all fopen() - fread($fp, filesize($filename)) > - fclose() cases, replacing them with one file_get_contents() call. > > Moreover, this fixes problem with bug > http://bugs.php.net/29023, which > prevents Smarty from working properly. > > Regardless of the fact that this bug will be fixed (I hope), this > fopen-fread-filesize-fclose mess can be safely replaced by one > file_get_contents() calls. > > Please, review it. i understand http://bugs.php.net/29023 in a way that the bug only occurs if not a larger read size is specified as the second parameter. smarty passes the filesize as second parameter and should work well, not? > --- > WBR, > Antony Dovgal aka tony2001 > tony2001@phpclub.net || antony@dovgal.com

« previous php.smarty.dev (#2442) next »