From 247451fca5bad516584e034685cb327747a8a4dc Mon Sep 17 00:00:00 2001
From: Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>
Date: Sat, 25 Mar 2006 18:02:52 +0000
Subject: [PATCH]  do not allow override of #value => NULL for #type => value
 elements  patch by chx

---
 includes/form.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/form.inc b/includes/form.inc
index 5e7324f119e2..d6da7932c3c8 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -326,7 +326,7 @@ function form_builder($form_id, $form) {
       $ref =& $ref[$parent];
     }
     $form['#ref'] = &$ref;
-    if (!isset($form['#value'])) {
+    if (!isset($form['#value']) && !array_key_exists('#value', $form)) {
       if ($posted) {
         switch ($form['#type']) {
           case 'checkbox':
-- 
GitLab