*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
*/
public final function outputStream ($output) {
// Split multiple lines into and array to put them out line-by-line
- $errorLines = explode("\n", $output);
+ $errorLines = explode(chr(10), $output);
+
+ // "Walk" through all lines
foreach ($errorLines as $err) {
+ // Trim any spaces, \n, \r etc. out
$err = trim($err);
+
// Log only none-empty lines
if (!empty($err)) {
// Log this line
error_log(html_entity_decode(strip_tags($err)), 0);
- }
- }
+ } // END - if
+ } // END - foreach
}
/**