Skip to content
Snippets Groups Projects
Commit 6795bd71 authored by Thomas Lake's avatar Thomas Lake :wrench:
Browse files

Replace ereg with preg_match (ereg is deprecated in PHP 5.3)

parent c53a1009
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,7 @@ $smarty->assign("user_messages", $messages); ...@@ -150,7 +150,7 @@ $smarty->assign("user_messages", $messages);
// Render the results // Render the results
if (!(isset($no_template)) || (!$no_template)) { if (!(isset($no_template)) || (!$no_template)) {
// Send appropriate Content-Type // Send appropriate Content-Type
if (ereg('application/xhtml\+xml', @$_SERVER['HTTP_ACCEPT'])) { if (preg_match('#application/xhtml\+xml#', @$_SERVER['HTTP_ACCEPT'])) {
header('Content-Type: application/xhtml+xml'); header('Content-Type: application/xhtml+xml');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment