bcit-ci / CodeIgniter

Open Source PHP Framework (originally from EllisLab)

Home Page:https://codeigniter.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find the language line "insert_batch() called with no data"

jamieburchell opened this issue · comments

There are a couple of places in the DB_query_builder.php file where a missing language line is referenced:

return ($this->db_debug) ? $this->display_error('insert_batch() called with no data') : FALSE;

return ($this->db_debug) ? $this->display_error('update_batch() called with no data') : FALSE;

Which PHP version are you using?

Which PHP version are you using?

PHP 8.1, but it's not relevant because the language keys are just missing in CI's DB lang file. If you look at the other references to lang keys they are all in a lowercase/underscore format rather than a sentence.

I am using the develop branch so the line numbers differ, but here are the required changes to fix this issue:

Add the following line to /system/language/english/db_lang.php

$lang['db_data_required'] = '%s called with no data';

And then change line 1499 in /system/database/DB_query_builder.php:

return ($this->db_debug) ? $this->display_error('db_data_required', 'insert_batch()') : FALSE;

And line 1916:

return ($this->db_debug) ? $this->display_error('db_data_required', 'update_batch()') : FALSE;