codeigniter-base-model
codeigniter-base-model copied to clipboard
Unused third param for insert_many call to insert?
Hi,
Is there a reason for the existence of the third param on line 240?
$ids[] = $this->insert($row, $skip_validation, ($key == count($data) - 1));
Thanks
It seems to be passing a boolean argument, being 'true' if it is the last iteration of the loop.
However, looking at line 207 (this insert method being called form line 240), no third argument is listed.
This value could still be accessed using func_get_args(), which @jamierumbelow uses through the base model, however I do not yet see how it is used.
I think this is a hangover from a previous version of the code (where I needed the last iteration of the loop). Don't worry about it – I got rid of it a while ago and must have forgotten to delete this line :-)