Skip to content

Commit 0f790e7

Browse files
committed
Ensure any code after a redirect is not executed
1 parent 3193b41 commit 0f790e7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/gmail_send_email.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
$_SESSION['access_token'] = $curl->response->access_token;
3535
header('Location: ?');
36+
exit;
3637
} elseif (!empty($_SESSION['access_token'])) {
3738
// Use the access token to send an email.
3839
$curl = new Curl();

examples/google_plus_profile.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
$_SESSION['access_token'] = $curl->response->access_token;
3535
header('Location: ?');
36+
exit;
3637
} elseif (!empty($_SESSION['access_token']) && !isset($_GET['retry'])) {
3738
// Use the access token to retrieve the profile.
3839
$curl = new Curl();

0 commit comments

Comments
 (0)