Re: Bug #12081 Updated: A successfull snmpset() always returns "false"

From: Date: Fri, 13 Jul 2001 07:01:06 +0000
Subject: Re: Bug #12081 Updated: A successfull snmpset() always returns "false"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59911@lists.php.net to get a copy of this message
Hello. Sorry for replying to this mail, but I forgot to set a password when opening the bug report. Yes. gettype() for the result from snmpset() returns "array". I was mistaken because after successfull comparison of the result with false, I looked at the documentation and found snmpset() declared as bool snmpset (...), with the explanation "...returning true on success and false on error". On 12 Jul 2001, Bug Database wrote: > ID: 12081 > Updated by: rasmus > Reported By: vesselin@bgnet.bg > Old Summary: A successfull snmpset() always returns "false" > Status: Open > Bug Type: SNMP related > Operating System: Slackware-7.1, kernel.2.4.6 > PHP Version: 4.0.6 > New Comment: > > >From looking at the code it would appear that snmpset() would return an empty array unless > >something goes wrong. Granted, that is sub-optimal, but I don't think it returns false. Could > >you verify this for me that it is actually an empty array and not false? > > Previous Comments: > ------------------------------------------------------------------------ > > [2001-07-12 02:31:47] vesselin@bgnet.bg > > I think the bug is in ext/snmp/snmp.c. php_snmp() initializes "return_value" only for > snmp functions that return some MIB variable(s). It should "RETURN_TRUE" for snmpset too. > > > ------------------------------------------------------------------------ > > > > ATTENTION! Do NOT reply to this email! > To reply, use the web interface found at > http://bugs.php.net/?id=12081&edit=2 >

« previous php.dev (#59911) next »