title: craft cms command line update to version 3.5.12.1 or greater fails
body: <p>I am running the following command to update craft cms:</p>
  <pre><code>php craft update craft
  </code></pre>
  <p>However upgrading to version 3.5.12.1 or greater fails with the following error:</p>
  <pre><code>Performing update with Composer ... done
  Applying new migrations ... error: The command &quot;'/var/www/craft' 'migrate/all' '--no-content'&quot; failed.
  
  Exit Code: 1(General error)
  
  Working directory: /var/www
  
  Output:
  ================
  
  
  Error Output:
  ================
  Error: array_merge(): Expected parameter 2 to be an array, null given
  
  
  Output:
  </code></pre>
  <p>The current version of craft that I am running is 3.3.19, and it's running in a docker, using the following composer.json:</p>
  <pre><code>. . .
   &quot;require&quot;: {
      &quot;aelvan/craft-cp-element-count&quot;: &quot;^v1.0.1&quot;,
      &quot;aelvan/imager&quot;: &quot;v2.3.0&quot;,
      &quot;aelvan/inlin&quot;: &quot;^2.1&quot;,
      &quot;aelvan/preparse-field&quot;: &quot;v1.1.0&quot;,
      &quot;am-impact/amcommand&quot;: &quot;^3.1.4&quot;,
      &quot;angellco/portal&quot;: &quot;1.1.3&quot;,
      &quot;angellco/spoon&quot;: &quot;3.3.7&quot;,
      &quot;charliedev/element-map&quot;: &quot;^1.2&quot;,
      &quot;charliedev/section-field&quot;: &quot;^1.1.0&quot;,
      &quot;craftcms/aws-s3&quot;: &quot;1.2.5&quot;,
      &quot;craftcms/cms&quot;: &quot;3.3.19&quot;,
      &quot;craftcms/feed-me&quot;: &quot;4.1.2&quot;,
      &quot;craftcms/redactor&quot;: &quot;2.4.0&quot;,
      &quot;doublesecretagency/craft-inventory&quot;: &quot;2.0.3&quot;,
      &quot;doublesecretagency/craft-siteswitcher&quot;: &quot;2.1.0&quot;,
      &quot;ether/logs&quot;: &quot;^3.0.3&quot;,
      &quot;ether/sidebarentrytypes&quot;: &quot;^1.0&quot;,
      &quot;fruitstudios/linkit&quot;: &quot;1.1.11&quot;,
      &quot;hashtagerrors/user-initials-photo&quot;: &quot;1.1.1&quot;,
      &quot;lukeyouell/craft-queue-manager&quot;: &quot;^1.1.0&quot;,
      &quot;marionnewlevant/snitch&quot;: &quot;3.0.0&quot;,
      &quot;misterbk/mix&quot;: &quot;^1.5&quot;,
      &quot;mmikkel/child-me&quot;: &quot;1.0.6&quot;,
      &quot;mmikkel/cp-field-inspect&quot;: &quot;1.0.7&quot;,
      &quot;mmikkel/incognito-field&quot;: &quot;1.1.1.1&quot;,
      &quot;monachilada/craft-matrixtoolbar&quot;: &quot;^1.0.6&quot;,
      &quot;nfourtythree/entriessubset&quot;: &quot;1.2.2&quot;,
      &quot;nystudio107/craft-cookies&quot;: &quot;^1.1&quot;,
      &quot;nystudio107/craft-emptycoalesce&quot;: &quot;1.0.6&quot;,
      &quot;nystudio107/craft-imageoptimize&quot;: &quot;1.6.4&quot;,
      &quot;nystudio107/craft-minify&quot;: &quot;^1.2.9&quot;,
      &quot;nystudio107/craft-retour&quot;: &quot;3.1.27&quot;,
      &quot;nystudio107/craft-scripts&quot;: &quot;^1.2.4&quot;,
      &quot;nystudio107/craft-seomatic&quot;: &quot;3.2.32&quot;,
      &quot;nystudio107/craft-typogrify&quot;: &quot;1.1.18&quot;,
      &quot;nystudio107/craft-webperf&quot;: &quot;1.0.14&quot;,
      &quot;ostark/craft-async-queue&quot;: &quot;2.0.0&quot;,
      &quot;page-8/craft-manytomany&quot;: &quot;1.0.2.2&quot;,
      &quot;putyourlightson/craft-blitz&quot;: &quot;2.3.4&quot;,
      &quot;rias/craft-position-fieldtype&quot;: &quot;^1.0.13&quot;,
      &quot;rias/craft-width-fieldtype&quot;: &quot;^1.0&quot;,
      &quot;spicyweb/craft-embedded-assets&quot;: &quot;2.1.1.1&quot;,
      &quot;spicyweb/craft-fieldlabels&quot;: &quot;1.1.7&quot;,
      &quot;spicyweb/craft-neo&quot;: &quot;2.5.7&quot;,
      &quot;superbig/craft-entry-instructions&quot;: &quot;1.0.6&quot;,
      &quot;topshelfcraft/environment-label&quot;: &quot;^3.1.5&quot;,
      &quot;verbb/cp-nav&quot;: &quot;^2.0.9&quot;,
      &quot;verbb/default-dashboard&quot;: &quot;^1.0&quot;,
      &quot;verbb/expanded-singles&quot;: &quot;^1.0.4&quot;,
      &quot;verbb/field-manager&quot;: &quot;2.1.0&quot;,
      &quot;verbb/icon-picker&quot;: &quot;1.0.10&quot;,
      &quot;verbb/image-resizer&quot;: &quot;2.0.6&quot;,
      &quot;verbb/super-table&quot;: &quot;2.3.0&quot;,
      &quot;vlucas/phpdotenv&quot;: &quot;^2.4.0&quot;,
      &quot;wbrowar/craft-communicator&quot;: &quot;^1.0&quot;,
      &quot;wbrowar/guide&quot;: &quot;2.1.2&quot;,
      &quot;yiisoft/yii2-redis&quot;: &quot;^2.0&quot;
    },
    &quot;repositories&quot;: {
      &quot;element-map&quot;: {
        &quot;type&quot;: &quot;path&quot;,
        &quot;url&quot;: &quot;./plugins/element-map&quot;
      }
    },
    &quot;autoload&quot;: {
      &quot;psr-4&quot;: {
        &quot;modules\\utilitiesmodule\\&quot;: &quot;modules/utilitiesmodule/src/&quot;,
        &quot;putyourlightson\\blitz\\drivers\\storage\\&quot;: &quot;plugins/blitz-override&quot;
      }
    },
    &quot;config&quot;: {
      &quot;optimize-autoloader&quot;: true,
      &quot;config&quot;: {
        &quot;process-timeout&quot;: 0
      },
      &quot;platform&quot;: {
        &quot;php&quot;: &quot;7.2.5&quot;
      },
      &quot;sort-packages&quot;: true
    },
    &quot;scripts&quot;: {
      &quot;post-update-cmd&quot;: [
        &quot;./craft migrate/all&quot;,
        &quot;./craft clear-caches/all&quot;
      ],
      &quot;post-install-cmd&quot;: [
        &quot;./craft migrate/all&quot;,
        &quot;./craft clear-caches/all&quot;
      ]
    }
  }
  </code></pre>
  <p>I have tried disabling plugins but that seems to make no difference. Also, I am not sure where the &quot;'/var/www/craft' 'migrate/all' '--no-content'&quot; command is even coming from since that seems to be slightly different command than what is in the composer.json.</p>
  <p>When I try to run just the migration:</p>
  <pre><code>./craft migrate/all
  </code></pre>
  <p>I get the following stack trace:</p>
  <pre><code>PHP Warning 'yii\base\ErrorException' with message 'array_merge(): Expected parameter 2 to be an array, null given'
  
  in /var/www/vendor/yiisoft/yii2/web/UrlManager.php:222
  Stack trace:
  #0 [internal function]: yii\base\ErrorHandler-&gt;handleError()
  #1 /var/www/vendor/yiisoft/yii2/web/UrlManager.php(222): array_merge()
  #2 /var/www/vendor/yiisoft/yii2-debug/src/Module.php(290): yii\web\UrlManager-&gt;addRules()
  #3 /var/www/vendor/yiisoft/yii2/base/Application.php(333): yii\debug\Module-&gt;bootstrap()
  #4 /var/www/vendor/craftcms/cms/src/console/Application.php(61): yii\base\Application-&gt;bootstrap()
  #5 /var/www/vendor/yiisoft/yii2/base/Application.php(279): craft\console\Application-&gt;bootstrap()
  #6 /var/www/vendor/yiisoft/yii2/console/Application.php(125): yii\base\Application-&gt;init()
  #7 /var/www/vendor/craftcms/cms/src/console/Application.php(47): yii\console\Application-&gt;init()
  #8 /var/www/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\console\Application-&gt;init()
  #9 /var/www/vendor/yiisoft/yii2/base/Application.php(212): yii\base\BaseObject-&gt;__construct()
  #10 /var/www/vendor/yiisoft/yii2/console/Application.php(90): yii\base\Application-&gt;__construct()
  #11 [internal function]: yii\console\Application-&gt;__construct()
  #12 /var/www/vendor/yiisoft/yii2/di/Container.php(420): ReflectionClass-&gt;newInstanceArgs()
  #13 /var/www/vendor/yiisoft/yii2/di/Container.php(171): yii\di\Container-&gt;build()
  #14 /var/www/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container-&gt;get()
  #15 /var/www/vendor/craftcms/cms/bootstrap/bootstrap.php(246): yii\BaseYii::createObject()
  #16 /var/www/vendor/craftcms/cms/bootstrap/console.php(51): require('/var/www/vendor...')
  #17 /var/www/craft(21): require('/var/www/vendor...')
  #18 {main}
  </code></pre>
  <p>It appears to be a bug in craft related to the UrlManager code, but if this is the case, I don't know why others have not seemed to experience it (I couldn't find anything about it in my searches)? Does anyone have any suggestions as to what could be wrong?</p>