[Devel] testing value of avp that is not set
Juha Heinanen
jh at tutpro.com
Fri Feb 9 00:36:51 CET 2007
i did some testing of the new pseudo variable capabilities and noticed
that i get an error
Feb 9 01:30:53 localhost /usr/sbin/openser[15198]: comp_scriptvar: invalid operation 20/3/1!!
Feb 9 01:30:53 localhost /usr/sbin/openser[15198]: WARNING: do_action:error in expression
in a test
if ($avp(i:105) == 1) { ...
when $avp(i:105) has not been set.
in order to get rid of the error, i need to change the test to
if (is_avp_set("$avp(i:105)") && ($avp(i:105) == 1)) { ...
in order to make things more user friendly, would it be a better to make
the set test automatically before actually comparing the avp value?
-- juha
More information about the Devel
mailing list