Index: login_destination.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/login_destination/login_destination.module,v
retrieving revision 1.8
diff -u -F^f -r1.8 login_destination.module
--- login_destination.module	1 Dec 2008 13:37:22 -0000	1.8
+++ login_destination.module	16 Jan 2009 11:52:01 -0000
@@ -109,6 +109,7 @@ function login_destination_admin_setting
  * Implementation of hook_user.
  */
 function login_destination_user($op, &$edit, &$account, $category = NULL) {
+  $url = '';
   switch ($op) {
   case 'login':
     global $language;
@@ -144,7 +145,8 @@ function login_destination_user($op, &$e
  * @return bool TRUE - apply redirect, FALSE - not to apply redirect.
  */
 function login_destination_apply_redirect() {
-  if ($_GET['destination'] != $_GET['q'] && variable_get('ld_destination', TRUE)) {
+  $destination = isset($_GET['destination']) ? $_GET['destination'] : '';
+  if ($destination != $_GET['q'] && variable_get('ld_destination', TRUE)) {
     return FALSE;
   }
 
