Permalink
Browse files

fix a notice on source file parsing caused by empty lines that should…

…n't be parsed
  • Loading branch information...
1 parent ee38f61 commit d96aef812dd7fa876566bfb8a8a7cd6ae252b39d @pascalchevrel pascalchevrel committed Jan 5, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/PropertiesParser.class.php
@@ -19,7 +19,7 @@ class PropertiesParser
public static function propertiesToArray($file) {
if (!is_file($file)) return array();
- $source = file($file);
+ $source = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
// we parse the $source array, remove white space and delimiting quotes, skip comments and blank lines
foreach ($source as $value) {
@@ -39,4 +39,4 @@ public static function propertiesToArray($file) {
return $finalArray;
}
-}
+}

0 comments on commit d96aef8

Please sign in to comment.