From 4b086c9c08b2b32a67e85df7b0c5cf3a4040b4e2 Mon Sep 17 00:00:00 2001 From: remicollet Date: Fri, 2 Dec 2011 08:12:53 +0000 Subject: [PATCH] fix getSpecificValueToDisplay proto git-svn-id: https://forge.glpi-project.org/svn/example/trunk@177 349b9182-4a13-0410-896f-e5e9767dd1b3 --- inc/example.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/example.class.php b/inc/example.class.php index b1ad247..a914004 100644 --- a/inc/example.class.php +++ b/inc/example.class.php @@ -172,9 +172,12 @@ class PluginExampleExample extends CommonDBTM { return true; } - static function getSpecificValueToDisplay($field, &$values, $options=array()) { + static function getSpecificValueToDisplay($field, $values, $options=array()) { global $LANG; + if (!is_array($values)) { + $values = array($field => $values); + } switch ($field) { case 'serial' : return "S/N: ".$values[$field];