cvs: smarty /libs Config_File.class.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1076188531@cvsserver>
messju		Sat Feb  7 16:15:31 2004 EDT

  Modified files:              
    /smarty/libs	Config_File.class.php 
  Log:
  avoid @-operator for handling empty lines in Config_File.class.php
  
  
http://cvs.php.net/diff.php/smarty/libs/Config_File.class.php?r1=1.64&r2=1.65&ty=u
Index: smarty/libs/Config_File.class.php
diff -u smarty/libs/Config_File.class.php:1.64 smarty/libs/Config_File.class.php:1.65
--- smarty/libs/Config_File.class.php:1.64	Thu Jan 22 18:47:46 2004
+++ smarty/libs/Config_File.class.php	Sat Feb  7 16:15:29 2004
@@ -31,7 +31,7 @@
  * @package Smarty
  */
 
-/* $Id: Config_File.class.php,v 1.64 2004/01/22 23:47:46 messju Exp $ */
+/* $Id: Config_File.class.php,v 1.65 2004/02/07 21:15:29 messju Exp $ */
 
 /**
  * Config file reading class
@@ -289,7 +289,9 @@
         $lines = $match[0];
         for ($i=0, $count=count($lines); $i<$count; $i++) {
             $line = $lines[$i];
-            if ( @($line{0} == '[') && preg_match('!^\[(.*?)\]!', $line, $match) ) {
+            if (empty($line)) continue;
+
+            if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
                 /* section found */
                 if ($match[1]{0} == '.') {
                     /* hidden section */

-- 
Smarty CVS Mailing List (http://cvs.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.