|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-05-09 11:10 UTC] gubin dot gm at yandex dot ru
Description:
------------
Bag in method SNMP::walk.
The parameter $suffix_as_key not working correctly.
Test script:
---------------
<?php
$session = new SNMP(SNMP::VERSION_2c, "127.0.0.1", "public");
$ifDescr = $session->walk(".1.3.6.1.2.1.2.2.1.2", TRUE);
print_r($ifDescr);
?>
Expected result:
----------------
Array
(
[1001] => Port 1:1
[1002] => Port 1:2
[1003] => Port 1:3
...
)
Actual result:
--------------
Array
(
[1001] => Port 1:1
[iso.3.6.1.2.1.2.2.1.2.1002] => Port 1:2
[iso.3.6.1.2.1.2.2.1.2.1003] => Port 1:3
...
)
Patchessnmp.c.patch (last revision 2013-03-13 20:08 UTC by lvgb at sina dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
tested on php 5.4.4 - works. without patch: Array ( [1] => D-Link DES-3010G R4.30.B20 Port 1 [iso.3.6.1.2.1.2.2.1.2.2] => D-Link DES-3010G R4.30.B20 Port 2 [iso.3.6.1.2.1.2.2.1.2.3] => D-Link DES-3010G R4.30.B20 Port 3 [iso.3.6.1.2.1.2.2.1.2.4] => D-Link DES-3010G R4.30.B20 Port 4 [iso.3.6.1.2.1.2.2.1.2.5] => D-Link DES-3010G R4.30.B20 Port 5 [iso.3.6.1.2.1.2.2.1.2.6] => D-Link DES-3010G R4.30.B20 Port 6 [iso.3.6.1.2.1.2.2.1.2.7] => D-Link DES-3010G R4.30.B20 Port 7 [iso.3.6.1.2.1.2.2.1.2.8] => D-Link DES-3010G R4.30.B20 Port 8 [iso.3.6.1.2.1.2.2.1.2.9] => D-Link DES-3010G R4.30.B20 Port 9 [iso.3.6.1.2.1.2.2.1.2.10] => D-Link DES-3010G R4.30.B20 Port 10 ) with patch: Array ( [1] => D-Link DES-3010G R4.30.B20 Port 1 [2] => D-Link DES-3010G R4.30.B20 Port 2 [3] => D-Link DES-3010G R4.30.B20 Port 3 [4] => D-Link DES-3010G R4.30.B20 Port 4 [5] => D-Link DES-3010G R4.30.B20 Port 5 [6] => D-Link DES-3010G R4.30.B20 Port 6 [7] => D-Link DES-3010G R4.30.B20 Port 7 [8] => D-Link DES-3010G R4.30.B20 Port 8 [9] => D-Link DES-3010G R4.30.B20 Port 9 [10] => D-Link DES-3010G R4.30.B20 Port 10 ) Push patch to main tree.