diff --git a/core/includes/common.inc b/core/includes/common.inc
index a18e1e4..ef369fb 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -449,7 +449,7 @@ function drupal_get_query_array($query) {
   if (!empty($query)) {
     foreach (explode('&', $query) as $param) {
       $param = explode('=', $param);
-      $result[$param[0]] = isset($param[1]) ? rawurldecode($param[1]) : '';
+      $result[$param[0]] = isset($param[1]) ? rawurldecode($param[1]) : NULL;
     }
   }
   return $result;
diff --git a/core/modules/simpletest/tests/common.test b/core/modules/simpletest/tests/common.test
index 4f20361..890c2a4 100644
--- a/core/modules/simpletest/tests/common.test
+++ b/core/modules/simpletest/tests/common.test
@@ -241,6 +241,18 @@ class CommonURLUnitTestCase extends DrupalWebTestCase {
   }
 
   /**
+   * Tests drupal_get_query_array().
+   */
+  function testDrupalGetQueryArray() {
+    $this->assertEqual(drupal_get_query_array('foo=bar'), array('foo' => 'bar'), 'Simple value works as expected.');
+    $this->assertEqual(drupal_get_query_array('foo=1'), array('foo' => '1'), 'Numeric value works as expected.');
+    $this->assertEqual(drupal_get_query_array('foo=1&bar=baz'), array('foo' => '1', 'bar' => 'baz'), 'Multiple values are parsed as well.');
+    $this->assertEqual(drupal_get_query_array('foo='), array('foo' => ''), 'An empty value is set as an empty string.');
+    $this->assertEqual(drupal_get_query_array('foo'), array('foo' => NULL), 'No value is set as a null value.');
+
+  }
+
+  /**
    * Test url() with/without query, with/without fragment, absolute on/off and
    * assert all that works when clean URLs are on and off.
    */
