In my table I have created an index on 'col1' to prevent duplicate entries which works well but the resulting error message displayed to a user when they attempt to add a duplicate entry seems to to me be a security concern as it displays the SQL including the table prefix.
Is there any way to stop Joomla from displaying the SQL in the error message?
I've tried changing the error reporting settings in the global config but it has no effect as far as I can tell...
Example message:
Error
Save failed with the following error: Duplicate entry 'Test' for key 'TestKey' SQL=INSERT INTO `jml_mycomp_tbl1` (`id`,`col1`,`ordering`,`state`,`created_by`) VALUES ('0','Test','2','1','730')
display_errors
(PHP setting) should be off and such errors should only be logged to your server-side error log.