[BUGFIX] Cleanup DebugUtility
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 22 Sep 2012 10:13:31 +0000 (12:13 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 22 Sep 2012 11:10:54 +0000 (13:10 +0200)
Replace control characters with constants.
Initialize variable.

Fixes: #41242
Releases: 6.0

Change-Id: I69993276fdf9f3f3718723965eef3018e9f0eabe
Reviewed-on: http://review.typo3.org/14907
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Utility/DebugUtility.php

index d11fd55..8325baa 100644 (file)
@@ -128,10 +128,8 @@ class DebugUtility {
                                '"',
                                '/',
                                '<',
-                               '
-',
-                               '
-'
+                               LF,
+                               CR
                        ), array(
                                '\\"',
                                '\\/',
@@ -144,10 +142,8 @@ class DebugUtility {
                                '"',
                                '/',
                                '<',
-                               '
-',
-                               '
-'
+                               LF,
+                               CR
                        ), array(
                                '\\"',
                                '\\/',
@@ -312,6 +308,7 @@ class DebugUtility {
                if (strlen($string) < $characters) {
                        $characters = strlen($string);
                }
+               $valuestring = '';
                for ($i = 0; $i < $characters; $i++) {
                        $valuestring .= ' ' . ord(substr($string, $i, 1));
                }