Skip to content

Commit d4f7e4f

Browse files
committed
* is a valid field for select
1 parent 4823298 commit d4f7e4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PHPFUI/ORM/Table.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,16 @@ public static function capitalSplit(string $key) : string
301301

302302
public function cleanField(string $fieldName) : string
303303
{
304-
// Remove invalid characters (replace with space) but allow . for fully specified fields
305-
$sanitized = \preg_replace('/[^a-zA-Z0-9_$.]/', '', $fieldName);
304+
// Remove invalid characters (replace with space) but allow * and . for fully specified fields
305+
$sanitized = \preg_replace('/[^a-zA-Z0-9_$.*]/', '', $fieldName);
306306

307307
// Remove leading/trailing underscores
308308
$sanitized = \trim($sanitized, '_');
309309

310-
// If the string is empty after sanitization, use field
310+
// If the string is empty after sanitization, use *
311311
if (! \strlen($sanitized))
312312
{
313-
$sanitized = 'field';
313+
$sanitized = '*';
314314
}
315315

316316
return $sanitized;

0 commit comments

Comments
 (0)