diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index 121a1b9..3ef6ecc 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -235,7 +235,9 @@ function tablesort_get_order($headers) {
  */
 function tablesort_get_sort($headers) {
   if (isset($_GET['sort'])) {
-    return (strtolower($_GET['sort']) == 'desc') ? 'desc' : 'asc';
+    // PHP allows either arrays or strings via GET, so typecast to enforce that
+    // $_GET['sort'] is interpreted as a string.
+    return (strtolower((string) $_GET['sort']) == 'desc') ? 'desc' : 'asc';
   }
   // The user has not specified a sort. Use the default for the currently sorted
   // header if specified; otherwise use "asc".
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index e27693c..50487b7 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -2393,6 +2393,20 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
 
     unset($_GET['page']);
   }
+
+  /**
+   * Confirm that loading example.com/admin/content?sort[] returns no PHP warning.
+   */
+  function testPageVariableInvalidGetSort() {
+    global $user;
+    $original_account = $user;
+    $account = $this->drupalCreateUser(array('access administration pages', 'access content overview', 'administer nodes'));
+    $this->drupalLogin($account);
+    $user = user_load($account->uid);
+    $this->drupalGet('admin/content', array('query' => array('sort[]' => NULL)));
+    $this->assertNoText(t('Warning'), 'Ensure that visiting /admin/content?sort[] doesn\'t give a warning.');
+    $user = user_load($original_account->uid);
+  }
 }
 
 
