fields
fields copied to clipboard
"Undefined index: HTTP_REFERER" with an additionnal field in ticket [1.13.0]
When you are an additional field before the save button in the ticket form, you get an error on "Undefined Index: HTTP_REFERER":
Notice: Undefined index: HTTP_REFERER in C:\wamp64\www\glpi\plugins\fields\inc\field.class.php on line 757
Notice: Undefined index: HTTP_REFERER in C:\wamp64\www\glpi\plugins\fields\inc\field.class.php on line 758
The configuration of element:
I've fixed the issue in adding an empty value when null:
if (stristr($container_obj->fields['itemtypes'], 'Ticket') !== false
&& $container_obj->fields['type'] == 'dom'
&& strpos($_SERVER['HTTP_REFERER'] ?? '', ".injector.php") === false
&& strpos($_SERVER['HTTP_REFERER'] ?? '', ".public.php") === false) {
$html.= "<th width='13%'>$label</th>";
} else {
$html.= "<td>$label</td>";
}
There has been no activity on this issue for some time and therefore it is considered stale
If this issue is related to a bug, please try to reproduce on latest release (GLPI and plugin). If the problem persist, feel free to open a new issue.
If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.
You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.