-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
table name needs to be quoted #39487
Copy link
Copy link
Closed
Labels
Description
Steps to reproduce the issue
Create a component (com_xxx) using a table with a special character, e.g. da-events
Go to ...?option=com_xxx&view=event&layout=edit&id=1 to get the first element from the table
Expected result
Get in edit.php the data from the da-events table for id=1
Actual result
Exception informing about sql syntax error (without insight in the actual query causing the error)
System information (as much as possible)
Joomla! Version 4.2.6
PHP Version 8.0.13
Database Server mysql
Version 10.3.28-MariaDB-cll-lve
Collation latin1_swedish_ci
Conn Collation utf8mb4_general_ci
Additional comments
The problem is in libraries/src/Table/Table.php
On line 734 it states: ->from($this->_tbl);
This should be: ->from($this->_db->quoteName($this->_tbl));
Reactions are currently unavailable