diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 23dd88d3151..811ad017c4d 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7384,10 +7384,17 @@ class Form
$objecttmp = null;
+ // Example of value for $objectdec:
+ // Bom:bom/class/bom.class.php:0:t.status=1
+ // Bom:bom/class/bom.class.php:0:t.status=1:ref
+ // Bom:bom/class/bom.class.php:0:(t.status:=:1):ref
$InfoFieldList = explode(":", $objectdesc, 4);
$vartmp = $InfoFieldList[3];
- $InfoFieldList[4] = preg_replace('/^.*:(\w*)$/', '\1', $vartmp); // take the sort field
- $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field
+ $reg = array();
+ if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) {
+ $InfoFieldList[4] = $reg[1]; // take the sort field
+ }
+ $InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field
$classname = $InfoFieldList[0];
$classpath = $InfoFieldList[1];