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

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

Open
jamieburchell opened this issue May 12, 2023 · 3 comments · May be fixed by #6268
Open

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

jamieburchell opened this issue May 12, 2023 · 3 comments · May be fixed by #6268

Comments

@jamieburchell
Copy link
Contributor

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;

@otengkwame
Copy link

Which PHP version are you using?

@jamieburchell
Copy link
Contributor Author

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.

@daveherman71
Copy link

daveherman71 commented May 19, 2023

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants