[sr-dev] [tracker] Task opened: Uninitialized $var returns 0 instead of <null>

sip-router admin at sip-router.org
Thu Jul 21 15:35:23 CEST 2011


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Alex Hermann (axlh) 

Attached to Project - sip-router
Summary - Uninitialized $var returns 0 instead of <null>
Task Type - Bug Report
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - There is an annoying difference between an uninitialized $avp and $var. When the value is queried, the $avp returns <null> whereas the $var returns 0. The latter is wrong, as 0 is a meaningful value.

Suggested fix: uninitialized $var should return <null>

Example:
$var(null) = $null;
$avp(null) = $null;
xlog("$$var(null) = $var(null)");
xlog("$$avp(null) = $avp(null)";

Output:
$var(null) = 0
$avp(null) = <null>


More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=141

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list