Fix stack trace rendering for strings with single quotes
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 20 Feb 2023 14:53:15 +0000 (15:53 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2023 14:53:15 +0000 (15:53 +0100)
wcfsetup/install/files/lib/core.functions.php

index 1338a093c613eb01dee7b15757f2e4e651091b6f..4db17865b7d9914ffcef7d77ba533295318e7e73 100644 (file)
@@ -647,7 +647,7 @@ EXPLANATION;
                                                                                                        case 'NULL':
                                                                                                                return 'null';
                                                                                                        case 'string':
-                                                                                                               return "'".addcslashes(StringUtil::encodeHTML($item), "\\'")."'";
+                                                                                                               return "'" . StringUtil::encodeHTML(addcslashes($item, "\\'")) . "'";
                                                                                                        case 'boolean':
                                                                                                                return $item ? 'true' : 'false';
                                                                                                        case 'array':