DBForge: "Undefined index: _literal" #1985

MunGell opened this Issue Nov 7, 2012 · 3 comments

2 participants

Severity: Notice
Message: Undefined index: _literal
Filename: mysqli/mysqli_forge.php

This is what application returns when calling $this->dbforge->add_column() function.

Also the code produces incorrect SQL query like this one:

ALTER TABLE `Users``created_at` timestamp

Can you show the exact code that you're using?


$this->dbforge->add_column($table_name, array($column_name => $column), $after);


  • $table_name is a string
  • $column_name` is a string
  • $column is an array:
        'type' => 'varchar',
        'constraint' => 255,

This code works fine on both current 2.1-stable and 4-month old develop branches. However, I am not able to make it work on current develop.

P.S. I know that $after parameter is not working on the most recent implementation, it is there for back compatability.

@narfbg narfbg added a commit that closed this issue Nov 8, 2012
@narfbg narfbg Fix #1985 e8b8963
@narfbg narfbg closed this in e8b8963 Nov 8, 2012


@nonchip nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013
@narfbg narfbg Fix #1985 b15c92a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment