Skip to content

Instantly share code, notes, and snippets.

@alexisbellido
Created September 10, 2013 15:36
Show Gist options
  • Save alexisbellido/6511213 to your computer and use it in GitHub Desktop.
Save alexisbellido/6511213 to your computer and use it in GitHub Desktop.
From e1253d6e9bee364c6ee3a5ce8a8a1c5354beee1b Mon Sep 17 00:00:00 2001
From: Alexis Bellido <alexis@ventanazul.com>
Date: Tue, 10 Sep 2013 14:56:56 +0000
Subject: [PATCH] Check for node object before comparing nid with q parameter
---
sites/all/themes/tnr/templates/page.tpl.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sites/all/themes/tnr/templates/page.tpl.php b/sites/all/themes/tnr/templates/page.tpl.php
index 685bff6..54a5937 100644
--- a/sites/all/themes/tnr/templates/page.tpl.php
+++ b/sites/all/themes/tnr/templates/page.tpl.php
@@ -124,7 +124,7 @@
<div id="logged-out-nav">
<?php if (isset($_GET['destination']) && $_GET['destination'] != 'full-access'): ?>
<a href="/user/login?destination=<?php print $_GET['destination']; ?>" id="sign-in">SIGN IN</a>
- <?php elseif ($_GET['q'] != $node->nid && $_GET['q'] != 'full-access'): ?>
+ <?php elseif (isset($node) && $_GET['q'] != $node->nid && $_GET['q'] != 'full-access'): ?>
<a href="/user/login?destination=<?php print $_GET['q']; ?>" id="sign-in">SIGN IN</a>
<?php else: ?>
<a href="/user/login" id="sign-in">SIGN IN</a>
--
1.7.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment