View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012718 | mantisbt | html | public | 2011-01-24 07:23 | 2014-12-08 02:07 |
Reporter | Kirill | Assigned To | dhx | ||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0dev | ||||
Target Version | 1.3.0-beta.1 | ||||
Summary | 0012718: Error php-parsing in /admin/check/index.php | ||||
Description | $php -v PHP Parse error: syntax error, unexpected T_STRING in /var/www/admin/check/index.php on line 63 | ||||
Tags | patch | ||||
Attached Files | 0012718.patch (1,202 bytes)
From a33ee7538391c90b6527a2c3632a5f42d7214b73 Mon Sep 17 00:00:00 2001 From: Kirill Krasnov <krasnovforum@gmail.com> Date: Mon, 24 Jan 2011 14:17:57 +0200 Subject: [PATCH] Fix incorrect php parcing with error PHP Parse error: syntax error, unexpected T_STRING in /admin/check/index.php on line 63 --- admin/check/index.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/admin/check/index.php b/admin/check/index.php index acc60a8..0e5417b 100644 --- a/admin/check/index.php +++ b/admin/check/index.php @@ -59,8 +59,8 @@ $t_show_all_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '0' : '1 $t_show_errors_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '1' : '0') . '&show_errors=' . ($g_show_errors ? '0' : '1') . '">' . ($g_show_errors ? 'Hide verbose error messages' : 'Show verbose error messages') . '</a>'; http_content_headers(); +echo '<?xml version="1.0" encoding="utf-8"?>'; ?> -<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" > <head> -- 1.7.3.1.msysgit.0 check.patch (781 bytes)
diff --git a/admin/check/index.php b/admin/check/index.php index acc60a8..3b66d55 100644 --- a/admin/check/index.php +++ b/admin/check/index.php @@ -59,8 +59,9 @@ $t_show_all_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '0' : '1 $t_show_errors_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '1' : '0') . '&show_errors=' . ($g_show_errors ? '0' : '1') . '">' . ($g_show_errors ? 'Hide verbose error messages' : 'Show verbose error messages') . '</a>'; http_content_headers(); + +header ("Content-Type:text/xml"); ?> -<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" > <head> | ||||
Reminder sent to: dhx There are two problems solved with this patch:
|
|
Why write into code XML header as string? Sending headers info is better. See attached check.patch. |
|
Thanks Kirill and atrol. I've applied the fix. @atrol: I think we should continue to allow short_tag_open unless it is going to cause problems later on. @Want: http_content_headers() already sends the correct Content-Type header depending on what the user's browser supports. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|