Bug #61981 [Com]: OO API, walk: $suffix_as_key is not working correctly
| From: | temnota dot am at gmail dot com | Date: | Fri, 06 Dec 2013 11:37:18 +0000 |
| Subject: | Bug #61981 [Com]: OO API, walk: $suffix_as_key is not working correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183180@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61981&edit=1
ID: 61981
Comment by: temnota dot am at gmail dot com
Reported by: gubin dot gm at yandex dot ru
Summary: OO API, walk: $suffix_as_key is not working
correctly
Status: No Feedback
Type: Bug
Package: SNMP related
Operating System: *
PHP Version: 5.4.3
Assigned To: lytboris
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2013-09-13 05:44:36] lytboris@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2013-03-17 16:58:15] lytboris@php.net
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2013-03-17 16:53:58] lytboris@php.net
Automatic comment on behalf of lytboris
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b32405053f5a32d8c4d83f7566f5b414afd3aedb
Log: Fix bug #61981
------------------------------------------------------------------------
[2013-03-17 16:53:57] lytboris@php.net
Automatic comment on behalf of lytboris
Revision: http://git.php.net/?p=php-src.git;a=commit;h=44197774c02506be626c85ec60889b58c6c0575e
Log: Fixed bug #61981
------------------------------------------------------------------------
[2012-05-09 11:10:56] 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
...
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61981&edit=1