Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Undefined array key error in spark db:table #8173

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Nov 8, 2023

Description

Before:

$ php spark db:table

CodeIgniter v4.4.3 Command Line Tool - Server Time: 2023-11-08 04:13:04 UTC+00:00

Here is the list of your database tables:
  [0]  migrations

Which table do you want to see? 0: a


[ErrorException]

Undefined array key "a"

at SYSTEMPATH/Commands/Database/ShowTableInfo.php:136

Backtrace:
  1    SYSTEMPATH/Commands/Database/ShowTableInfo.php:136
       CodeIgniter\Debug\Exceptions()->errorHandler(2, 'Undefined array key "a"', '/.../CodeIgniter4/system/Commands/Database/ShowTableInfo.php', 136)

  2    SYSTEMPATH/CLI/Commands.php:65
       CodeIgniter\Commands\Database\ShowTableInfo()->run([])

  3    SYSTEMPATH/CLI/Console.php:46
       CodeIgniter\CLI\Commands()->run('db:table', [])

  4    ROOTPATH/spark:102
       CodeIgniter\CLI\Console()->run()

After:

$ php spark db:table

CodeIgniter v4.4.3 Command Line Tool - Server Time: 2023-11-08 04:12:37 UTC+00:00

Here is the list of your database tables:
  [0]  migrations

Which table do you want to see? 0: a

Here is the list of your database tables:
  [0]  migrations

Which table do you want to see? 0: 1

Here is the list of your database tables:
  [0]  migrations

Which table do you want to see? 0: 

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Nov 8, 2023
@kenjis kenjis merged commit c2f341a into codeigniter4:develop Nov 9, 2023
61 checks passed
@kenjis kenjis deleted the fix-ShowTableInfo-promptByKey branch November 9, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants