From bfdac309c0fc824a537b0b140eba83d9ffdeed4d Mon Sep 17 00:00:00 2001 From: Tim Bond Date: Fri, 4 Jun 2021 14:12:00 -0700 Subject: [PATCH] Remove closing PHP tag from export as PHP array From the PHP manual[1]: > The closing tag of a PHP block at the end of a file is optional, and in some > cases omitting it is helpful when using include or require, so unwanted > whitespace will not occur at the end of files, and you will still be able to > add headers to the response later. It is also handy if you use output > buffering, and would not like to see added unwanted whitespace at the end of > the parts generated by the included files. 1: https://www.php.net/manual/en/language.basic-syntax.instruction-separation.php#example-41 --- source/exportgrid.pas | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/exportgrid.pas b/source/exportgrid.pas index 078a54dd..93579334 100644 --- a/source/exportgrid.pas +++ b/source/exportgrid.pas @@ -1048,8 +1048,6 @@ begin tmp := '\end{tabular}' + CRLF; efPHPArray: begin tmp := ');' + CRLF; - if radioOutputFile.Checked then - tmp := tmp + '?>'; end; efJSON: begin S.Size := S.Size - 1;