mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-25 05:14:08 +00:00
Remove hacks in sql query
This commit is contained in:
@@ -147,8 +147,12 @@ class Report extends FHCAPI_Controller
|
||||
$label .= ((array)$option)[array_find(array_keys((array)$option), function ($key) {
|
||||
return $key != 'value';
|
||||
})];
|
||||
|
||||
// Remove hacks in sql query like preselecting an entry (eg: '" selected="selected')
|
||||
$value = preg_replace('#([^\\\])".*#', '$1', $option->value);
|
||||
|
||||
return [
|
||||
'value' => $option->value,
|
||||
'value' => $value,
|
||||
'label' => $label,
|
||||
];
|
||||
}, $options);
|
||||
|
||||
Reference in New Issue
Block a user