diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index f014e2ac67..866acc7f1a 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -549,6 +549,7 @@ class queue var $queue_data = array(); var $package_size = 0; var $cache_file = ''; + var $eol = "\n"; /** * constructor @@ -559,6 +560,10 @@ class queue $this->data = array(); $this->cache_file = "{$phpbb_root_path}cache/queue.$phpEx"; + + // Determine EOL character (\n for UNIX, \r\n for Windows and \r for Mac) + $this->eol = (!defined('PHP_EOL')) ? (($eol = strtolower(substr(PHP_OS, 0, 3))) == 'win') ? "\r\n" : (($eol == 'mac') ? "\r" : "\n") : PHP_EOL; + $this->eol = (!$this->eol) ? "\n" : $this->eol; } /**