Welcome Guest, Not a member yet? Register   Sign In
4.2.3 Spark Error
#1
Wink 

We just upgraded to CI4.2.3, and we're getting a runtime error on our development server when executing spark:

Code:
CodeIgniter v4.2.3 Command Line Tool - Server Time: 2022-08-09 15:23:43 UTC+00:00


[Error]

Call to undefined method CodeIgniter\HTTP\CLIRequest::getGet()

at SYSTEMPATH/Debug/Toolbar.php:452

Backtrace:
  1    APPPATH/Config/Events.php:52
      CodeIgniter\Debug\Toolbar()->respond()

  2    SYSTEMPATH/Events/Events.php:149
      CodeIgniter\Events\Events::Config\{closure}()

  3    SYSTEMPATH/CodeIgniter.php:317
      CodeIgniter\Events\Events::trigger()

  4    SYSTEMPATH/CLI/Console.php:48
      CodeIgniter\CodeIgniter()->run()

  5    ROOTPATH/spark:98
      CodeIgniter\CLI\Console()->run()


There is a workaround, which is to change CI_ENVIRONMENT to production, start spark, then change CI_ENVIRONMENT back to development. Has anybody else encountered this?
Reply
#2

(This post was last modified: 08-12-2022, 04:06 AM by MGatner.)

Something is wrong with your setup. The Toolbar should never load from CLI (spark). app/Config/Events.php:
PHP Code:
    if (CI_DEBUG && ! is_cli()) {
        Events::on('DBQuery''CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
        Services::toolbar()->respond();
    

Make sure that file and spark are updates to the latest framework-equivalent versions.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB