[TYPO3-mvc] Does extbase do quote escaping in SQL?

Jochen Rau jochen.rau at typoplanet.de
Fri Aug 14 11:04:05 CEST 2009


Hi Andriy,

Andriy Kushnarov wrote:
> If I'm not wrong I get next error because of not escaped quotes.
> I'm trying to insert some data to database and get:
> Fatal error:  Uncaught exception
> 'Tx_Extbase_Persistence_Storage_Exception_SqlError' with message 'You
> have an error in your SQL syntax; check the manual that corresponds to
> your MySQL server version for the right syntax to use near '' and
> server host '%s' did not match!', 'Some Data',' at line 1' in
> typo3_4.3\typo3\sysext\extbase\Classes\Persistence\Storage\Typo3DbBackend.php:661
> Stack trace:
> #0 typo3_4.3\typo3\sysext\extbase\Classes\Persistence\Storage\Typo3DbBackend.php(101):
> Tx_Extbase_Persistence_Storage_Typo3DbBackend->checkSqlErrors()
> #1 typo3_4.3\typo3\sysext\extbase\Classes\Persistence\Backend.php(487):
> Tx_Extbase_Persistence_Storage_Typo3DbBackend->addRow('tx_l10nserver_d...',
> Array)
> #2 typo3_4.3\typo3\sysext\extbase\Classes\Persistence\Backend.php(345):
> Tx_Extbase_Persistence_Backend->insertObject(Object(Tx_L10nServer_Domain_Model_Label),
> Object(Tx_L10nServer_Domain_Model_Part), 'labels', A in
> <b>typo3_4.3\typo3\sysext\extbase\Classes\Persistence\Storage\Typo3DbBackend.php</b>
> on line<b>661</b><br />

You are right. The values are not quoted properly by now. This is 
related to Issue #3316. This is solved now, so I will implement proper 
quoting in the next few minutes ;-)

Regards
Jochen

-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list