mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
avoid @-operator for handling empty lines in Config_File.class.php
This commit is contained in:
@@ -289,7 +289,9 @@ class Config_File {
|
|||||||
$lines = $match[0];
|
$lines = $match[0];
|
||||||
for ($i=0, $count=count($lines); $i<$count; $i++) {
|
for ($i=0, $count=count($lines); $i<$count; $i++) {
|
||||||
$line = $lines[$i];
|
$line = $lines[$i];
|
||||||
if ( @($line{0} == '[') && preg_match('!^\[(.*?)\]!', $line, $match) ) {
|
if (empty($line)) continue;
|
||||||
|
|
||||||
|
if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
|
||||||
/* section found */
|
/* section found */
|
||||||
if ($match[1]{0} == '.') {
|
if ($match[1]{0} == '.') {
|
||||||
/* hidden section */
|
/* hidden section */
|
||||||
|
Reference in New Issue
Block a user