You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a problem with one table column that is a text type in my model.
When i try to search i've an error on line 311 in DataTablesComponent.php, PHP cannot set type "text" :
settype(): Invalid type [ROOT/vendor/ypnos-web/cakephp-datatables/src/Controller/Component/DataTablesComponent.php, line 311]
$columnDesc = $table->getSchema()->getColumn($column);
$columnType = $columnDesc['type'];
// wrap value for LIKE and NOT LIKE
if (strpos(strtolower($comparison), 'like') !== false) {
$value = $this->getConfig('prefixSearch') ? "{$value}%" : "%{$value}%";
if ($this->_table->getConnection()->getDriver() instanceof Postgres) {
if ($columnType !== 'string' && $columnType !== 'text') {
$textCast = "::text";
}
}
}
settype($value, $columnType);
$condition = ["{$table->getAlias()}.{$column}{$textCast} {$comparison}" => $value];
Can i force my text field to string without modify your controller file ?
Kind regards
The text was updated successfully, but these errors were encountered:
Hello,
I've a problem with one table column that is a text type in my model.
When i try to search i've an error on line 311 in DataTablesComponent.php, PHP cannot set type "text" :
settype(): Invalid type [ROOT/vendor/ypnos-web/cakephp-datatables/src/Controller/Component/DataTablesComponent.php, line 311]
Can i force my text field to string without modify your controller file ?
Kind regards
The text was updated successfully, but these errors were encountered: