Add quotes around strings in stack traces
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 12 Apr 2016 19:05:58 +0000 (21:05 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 12 Apr 2016 19:05:58 +0000 (21:05 +0200)
wcfsetup/install/files/lib/core.functions.php

index 285e57ffea3d857a2765815126c9f4a7f51f993a..6b0832c0c45a057d881a2b9a2c85020df7f57843 100644 (file)
@@ -455,7 +455,7 @@ EXPLANATION;
                                                                                                        case 'NULL':
                                                                                                                return 'null';
                                                                                                        case 'string':
-                                                                                                               return StringUtil::encodeHTML($item);
+                                                                                                               return "'".addcslashes(StringUtil::encodeHTML($item), "\\'")."'";
                                                                                                        case 'boolean':
                                                                                                                return $item ? 'true' : 'false';
                                                                                                        case 'array':