Project

General

Profile

Revision 6a6d5972

ID6a6d5972cc29daf357330e5c0f43ea71d0b19793
Parent 411a1293
Child 09aac931

Added by Francois POIROTTE almost 7 years ago

On s'assure que les ID obtenus sont numériques

Change-Id: Ia36e086c889f340fbabd0a67b4c2de157aa574a6

View differences:

src/plugins/vigilo/inc/template.class.php
28 28
            "url" => $CFG_GLPI["root_doc"] . "/plugins/vigilo/ajax/getTemplates.php"
29 29
        );
30 30

  
31
        $id = $item->getID();
31
        $id = (int) $item->getID();
32 32
        $query = <<<SQL
33 33
SELECT `template`
34 34
FROM glpi_plugin_vigilo_template
......
40 40
            $templates  = static::getTemplates();
41 41
            $index      = array_search($tpl, $templates, true);
42 42
            if (false !== $index) {
43
                $opts['value']      = $index;
43
                $opts['value']      = (int) $index;
44 44
                $opts['emptylabel'] = $tpl;
45 45
            }
46 46
        }
......
118 118
    {
119 119
        global $DB;
120 120

  
121
        $id = $item->getID();
121
        $id = (int) $item->getID();
122 122
        $query = <<<SQL
123 123
SELECT `template`
124 124
FROM glpi_plugin_vigilo_template

Also available in: Unified diff