X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FPrettyPrinterAbstract.php;fp=vendor%2Fnikic%2Fphp-parser%2Flib%2FPhpParser%2FPrettyPrinterAbstract.php;h=2339c75a3db2bf20be714970bf56d1521e659248;hp=5ba48850fe44ca8647f3eee928fa21ee499e74f2;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 5ba48850f..2339c75a3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -951,12 +951,15 @@ abstract class PrettyPrinterAbstract * @param string $append */ protected function safeAppend(string &$str, string $append) { - // $append must not be empty in this function if ($str === "") { $str = $append; return; } + if ($append === "") { + return; + } + if (!$this->labelCharMap[$append[0]] || !$this->labelCharMap[$str[\strlen($str) - 1]]) { $str .= $append;