Skip to content

Commit 8e6d641

Browse files
committed
Replace die with exit
1 parent 53401ec commit 8e6d641

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

class/class.page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function __construct($page_slug, $pages, $page_defaults = array()) {
105105
// Check for redirect.
106106
if (isset($curr_page['redirect']) and $curr_page['redirect'] != '') {
107107
header('Location: ' . $curr_page['redirect'], true, 301);
108-
die();
108+
exit();
109109
}
110110
// Mind a potential alias.
111111
if (isset($curr_page['alias']) and $curr_page['alias'] != '') {

index.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
if ($page_slug == $the_deployment_slug) {
9292
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
9393
include_once $the_deployment_script;
94-
die();
94+
exit();
9595
} else {
9696
http_response_code(400);
9797
$page_slug = 'error';
@@ -104,7 +104,7 @@
104104
require_once './lib/sitemap_generator.php';
105105
header('Content-Type: application/xml');
106106
echo generate_sitemap();
107-
die();
107+
exit();
108108
}
109109

110110

@@ -131,7 +131,7 @@
131131
$lang_redirect_url .= $tmp_slug . '/';
132132
}
133133
header('Location: ' . $lang_redirect_url, true, 307);
134-
die();
134+
exit();
135135
}
136136
} else {
137137
// Update cookie.
@@ -161,7 +161,7 @@
161161
if (isset($redirects[$full_url_parts]['target']) and $redirects[$full_url_parts]['target'] != '') {
162162
if (!isset($redirects[$full_url_parts]['type']) or $redirects[$full_url_parts]['type'] == '') $redirects[$full_url_parts]['type'] = 301;
163163
header('Location: ' . $redirects[$full_url_parts]['target'], true, $redirects[$full_url_parts]['type']);
164-
die();
164+
exit();
165165
}
166166
}
167167

lib/url_parsing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function parse_the_url($url) {
4242
if (isset($_SERVER['REQUEST_URI'])) {
4343
$url_parts_all = parse_the_url($current_url);
4444
} else {
45-
die();
45+
exit();
4646
}
4747
foreach ($url_parts_all['call_parts'] as $call_part) {
4848
if ($call_part != '') $url_parts[] = make_safe($call_part);

0 commit comments

Comments
 (0)