Quote device name in xpath request
Xpath requires quotes if non numeric device name (eg 894x)
This commit is contained in:
parent
2dc613f063
commit
67f2a8b2a3
|
@ -566,9 +566,8 @@ trait ajaxHelper {
|
|||
switch ($request['type']) {
|
||||
case 'firmware':
|
||||
$device = $request['device'];
|
||||
|
||||
$firmwareDir = $tftpBootXml->xpath("//Directory[@name='firmware']");
|
||||
$result = $firmwareDir[0]->xpath("//Directory[@name={$device}]");
|
||||
$result = $firmwareDir[0]->xpath("//Directory[@name='{$device}']");
|
||||
$filesToGet['firmware'] = (array)$result[0]->FileName;
|
||||
$totalFiles += count($filesToGet['firmware']);
|
||||
$srcDir['firmware'] = $provisionerUrl . (string)$result[0]->DirectoryPath;
|
||||
|
|
Loading…
Reference in a new issue