Issue Bug Closed

#25777Cannot use single quote in TS constant part

Xavier Perseguers 04/05/11, 18:53 updated 10/02/18, 12:20

Description

It is not possible to save a TS template if the constants contain a single quote, when using MSSQL.

After analyzing the problem, I located it in class.ux_t3lib_db.php in methods INSERTquery and UPDATEquery and only for ‘XL’ fields (clob) not ‘B’ (blob).

Methods should be updated as this:

before:

} elseif (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'XL') {
    // we skip the field in the regular UPDATE statement, it is only in clobfields
    $clobfields[$this->quoteFieldNames($k)] = $v;
} else {

after:

} elseif (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'XL') {
    // we skip the field in the regular UPDATE statement, it is only in clobfields
    $clobfields[$this->quoteFieldNames($k)] = $this->quoteStr($v, $table);
} else {

This does not seem to affect Oracle though.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.