| @@ -46,10 +46,10 @@ | ||
| 46 | 46 | * |
| 47 | 47 | * @access public |
| 48 | 48 | * @param string $filename The path to the file. |
| 49 | 49 | */ |
| 50 | - public function __construct( $filename = '' ) { | |
| 51 | - $this->_filename = trim( (string) $filename ); | |
| 50 | + public function __construct( $filename = null ) { | |
| 51 | + $this->_filename = trim( $filename ); | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * Fetches series information. |
| @@ -114,8 +114,10 @@ | ||
| 114 | 114 | * @param string $filename Optional file name to get handle. If omitted, $_filename is used. |
| 115 | 115 | * @return resource File handle resource on success, otherwise FALSE. |
| 116 | 116 | */ |
| 117 | 117 | protected function _get_file_handle( $filename = false ) { |
| 118 | + // set line endings auto detect mode | |
| 119 | + ini_set( 'auto_detect_line_endings', true ); | |
| 118 | 120 | // open file and return handle |
| 119 | 121 | return fopen( $filename ? $filename : $this->_filename, 'rb' ); |
| 120 | 122 | } |
| 121 | 123 | |