環境
PHP 7.2.21
CakePHP 2.10.18
やりたいこと
下記のエラーを修正
Error: Call to a member function dispatchMethod() on null
# 0 (Modelのファイルパス)(223): Model->__call('makeRoleTargetJ...', Array)
# 1 [internal function]: (対象のModel名)->__construct(Array)
# 2 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Utility/ClassRegistry.php(169): ReflectionClass->newInstance(Array)
# 3 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Console/Shell.php(316): ClassRegistry::init('(対象のModel名)')
# 4 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Console/Shell.php(269): Shell->loadModel('(対象のModel名)')
# 5 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Console/Shell.php(228): Shell->_loadModels()
# 6 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(221): Shell->initialize()
# 7 /(CakePHPディレクトリ)/Vendor/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
# 8 /(CakePHPディレクトリ)/(Projectディレクトリ)/Console/cake.php(48): ShellDispatcher::run(Array)
# 9 {main}
やったこと
env.phpの環境変数を確認して修正する
ModelやControllerは悪くなかった