From 74db7f0e76070b47a6be283b0896be02c1ce1987 Mon Sep 17 00:00:00 2001
From: David Mignot <idflood>
Date: Mon, 14 Mar 2011 09:23:55 +0100
Subject: [PATCH] Issue #935990 by dereine, idflood: port to drupal 7

---
 prepopulate.info   |    2 +-
 prepopulate.module |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/prepopulate.info b/prepopulate.info
index 277b354..ff2b418 100644
--- a/prepopulate.info
+++ b/prepopulate.info
@@ -1,3 +1,3 @@
 name = Prepopulate
 description = Allows form elements to be prepopulated from the URL.
-core = 6.x
+core = 7.x
diff --git a/prepopulate.module b/prepopulate.module
index cc6f842..8f28862 100644
--- a/prepopulate.module
+++ b/prepopulate.module
@@ -43,7 +43,7 @@ function prepopulate_form_alter(&$form, $form_state, $form_id) {
  */
 function _prepopulate_get_walk( & $form, & $getslice) {
   if (is_array($getslice)) {
-    if (!is_null($form['#default_value'])) {
+    if (isset($form['#default_value']) ? !is_null($form['#default_value']) : FALSE) {
       if (!is_array($form['#default_value'])) {
         // Something went wrong so stop here.
         return;
-- 
1.7.0.1.61.gdc05d

