Answers.Body: <p>This was a bug fixed in commit <a href="https://github.com/craftcms/cms/commit/8e75fccb3fddf9490a5db8b360979d374bbceb15" rel="nofollow noreferrer">https://github.com/craftcms/cms/commit/8e75fccb3fddf9490a5db8b360979d374bbceb15</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-11T08:12:38.173Z
Answers.LastActivityDate: 2018-08-11T08:12:38.173Z
Answers.UserDisplayName: darylknight
Body: <p>In the middle of upgrading a C2 site to C3. Everything went fine, including the step where you visit the control panel to complete the update, and now I’m at the login screen. But when I try to login, it flickers the loading icon for a second then stops doing anything. There’s a jQuery error in the console:</p>
  
  <pre><code>POST http://domain.test/index.php?p=admin/actions/users/login 500 (Internal Server Error)
  </code></pre>
  
  <p>web.log says this:</p>
  
  <pre><code>2018-08-09 11:09:37 [127.0.0.1][-][-][error][TypeError] TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in /Users/darylknight/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php on line 450 and defined in /Users/darylknight/Sites/domain/vendor/craftcms/cms/src/helpers/StringHelper.php:738
  </code></pre>
  
  <p>Any idea how I could go about debugging this? I upgraded a similar site yesterday with no issues.</p>
  
  <p>Stack trace below:</p>
  
  <pre><code>2018-08-09 13:07:26 [127.0.0.1][-][-][error][TypeError] TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php on line 450 and defined in /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/StringHelper.php:738
  Stack trace:
  #0 /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php(450): craft\helpers\StringHelper::toLowerCase(NULL)
  #1 /Users/user/Sites/domain/vendor/craftcms/cms/src/base/Field.php(395): craft\helpers\Db::parseParam('content.field_o...', Array)
  #2 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1624): craft\base\Field-&gt;modifyElementsQuery(Object(craft\elements\db\UserQuery), Object(craft\elements\db\UserQuery))
  #3 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1062): craft\elements\db\ElementQuery-&gt;_joinContentTable('craft\\elements\\...')
  #4 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery-&gt;prepare(Object(craft\db\mysql\QueryBuilder))
  #5 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/Query.php(146): yii\db\QueryBuilder-&gt;build(Object(craft\elements\db\UserQuery))
  #6 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/Query.php(274): yii\db\Query-&gt;createCommand(Object(craft\db\Connection))
  #7 /Users/user/Sites/domain/vendor/craftcms/cms/src/db/Query.php(177): yii\db\Query-&gt;one(NULL)
  #8 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1193): craft\db\Query-&gt;one(NULL)
  #9 /Users/user/Sites/domain/vendor/craftcms/cms/src/services/Users.php(175): craft\elements\db\ElementQuery-&gt;one()
  #10 /Users/user/Sites/domain/vendor/craftcms/cms/src/controllers/UsersController.php(128): craft\services\Users-&gt;getUserByUsernameOrEmail('daryl@codeknigh...')
  #11 [internal function]: craft\controllers\UsersController-&gt;actionLogin()
  #12 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #13 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)
  #14 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller-&gt;runAction('login', Array)
  #15 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('login', Array)
  #16 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module-&gt;runAction('users/login', Array)
  #17 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(538): craft\web\Application-&gt;runAction('users/login', Array)
  #18 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
  #19 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
  #20 /Users/user/Sites/domain/public/index.php(21): yii\base\Application-&gt;run()
  #21 /Users/user/.composer/vendor/laravel/valet/server.php(147): require('/Users/user...')
  #22 {main}
  2018-08-09 13:07:26 [127.0.0.1][-][-][info][application] $_GET = [
      'p' =&gt; 'admin/actions/users/login'
  ]
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-09T13:51:38.507Z
Comments.Text: Seems like a bug to me... can you send a database dump over to support@craftcms.com so we can look into it?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-10T18:07:02.593Z
Comments.Text: Just confirming this was a bug fixed in https://github.com/craftcms/cms/commit/8e75fccb3fddf9490a5db8b360979d374bbceb15
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-11T00:34:17.553Z
Comments.Text: I have a similar issue 
  Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, array given, called in C:\newXampp\vendor\craftcms\cms\src\helpers\Db.php on line 450
  
  in vendor\craftcms\cms\src\helpers\Db.php at line 450 – craft\helpers\StringHelper::toLowerCase(['label' => 'Waterproof', 'value' => 'waterproof', 'selected' => true])
Comments.UserDisplayName: Darryl Hardin
Tags: <craft3><upgrades>
Title: Upgrading C2 to C3 - TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string
ThreadText: # Upgrading C2 to C3 - TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string
  
  (Asked by: username_0 on 2018-08-09)
  
  In the middle of upgrading a C2 site to C3. Everything went fine, including the step where you visit the control panel to complete the update, and now I’m at the login screen. But when I try to login, it flickers the loading icon for a second then stops doing anything. There’s a jQuery error in the console:
  
  ```
  POST http://domain.test/index.php?p=admin/actions/users/login 500 (Internal Server Error)
  
  ```
  
  web.log says this:
  
  ```
  2018-08-09 11:09:37 [127.0.0.1][-][-][error][TypeError] TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in /Users/username_0/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php on line 450 and defined in /Users/username_0/Sites/domain/vendor/craftcms/cms/src/helpers/StringHelper.php:738
  
  ```
  
  Any idea how I could go about debugging this? I upgraded a similar site yesterday with no issues.
  
  Stack trace below:
  
  ```
  2018-08-09 13:07:26 [127.0.0.1][-][-][error][TypeError] TypeError: Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php on line 450 and defined in /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/StringHelper.php:738
  Stack trace:
  #0 /Users/user/Sites/domain/vendor/craftcms/cms/src/helpers/Db.php(450): craft\helpers\StringHelper::toLowerCase(NULL)
  #1 /Users/user/Sites/domain/vendor/craftcms/cms/src/base/Field.php(395): craft\helpers\Db::parseParam('content.field_o...', Array)
  #2 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1624): craft\base\Field->modifyElementsQuery(Object(craft\elements\db\UserQuery), Object(craft\elements\db\UserQuery))
  #3 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1062): craft\elements\db\ElementQuery->_joinContentTable('craft\\elements\\...')
  #4 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery->prepare(Object(craft\db\mysql\QueryBuilder))
  #5 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/Query.php(146): yii\db\QueryBuilder->build(Object(craft\elements\db\UserQuery))
  #6 /Users/user/Sites/domain/vendor/yiisoft/yii2/db/Query.php(274): yii\db\Query->createCommand(Object(craft\db\Connection))
  #7 /Users/user/Sites/domain/vendor/craftcms/cms/src/db/Query.php(177): yii\db\Query->one(NULL)
  #8 /Users/user/Sites/domain/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1193): craft\db\Query->one(NULL)
  #9 /Users/user/Sites/domain/vendor/craftcms/cms/src/services/Users.php(175): craft\elements\db\ElementQuery->one()
  #10 /Users/user/Sites/domain/vendor/craftcms/cms/src/controllers/UsersController.php(128): craft\services\Users->getUserByUsernameOrEmail('daryl@codeknigh...')
  #11 [internal function]: craft\controllers\UsersController->actionLogin()
  #12 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #13 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
  #14 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('login', Array)
  #15 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('login', Array)
  #16 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('users/login', Array)
  #17 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(538): craft\web\Application->runAction('users/login', Array)
  #18 /Users/user/Sites/domain/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application->_processActionRequest(Object(craft\web\Request))
  #19 /Users/user/Sites/domain/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
  #20 /Users/user/Sites/domain/public/index.php(21): yii\base\Application->run()
  #21 /Users/user/.composer/vendor/laravel/valet/server.php(147): require('/Users/user...')
  #22 {main}
  2018-08-09 13:07:26 [127.0.0.1][-][-][info][application] $_GET = [
      'p' => 'admin/actions/users/login'
  ]
  
  ```
  
  **Tags:** craft3, upgrades
  
  > **Comments:**
  > **username_1**: Seems like a bug to me... can you send a database dump over to support@craftcms.com so we can look into it?  
  > **username_1**: Just confirming this was a bug fixed in https://github.com/craftcms/cms/commit/8e75fccb3fddf9490a5db8b360979d374bbceb15  
  > **username_2**: I have a similar issue  Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, array given, called in C:\newXampp\vendor\craftcms\cms\src\helpers\Db.php on line 450  in vendor\craftcms\cms\src\helpers\Db.php at line 450 – craft\helpers\StringHelper::toLowerCase(['label' => 'Waterproof', 'value' => 'waterproof', 'selected' => true])  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-08-11. Score: 0 | Accepted answer
  
  This was a bug fixed in commit <https://github.com/craftcms/cms/commit/8e75fccb3fddf9490a5db8b360979d374bbceb15>
  
  
  ---
  
  