Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000407 [Yate - Yet Another Telephony Engine] module minor always 2015-11-08 13:56 2016-04-29 13:43
Reporter srgdts View Status public  
Assigned To paulc
Priority normal Resolution no change required  
Status feedback   Product Version
Summary 0000407: Javascript module: Array alway of length 0
Description YATE 5.4.2-1 r5954

The length property of an array always returnes 0.

var arr = new Array();
arr[0] = {"test3": "none1"};
arr[1] = {"test1": "none3"};

Output of the code:

'arr' = '[object Array]' (JsArray)
  '__proto__' = '[object Array]' (JsArray)
    'freeze' = '[function freeze()]' (ExpFunction)
    'isFrozen' = '[function isFrozen()]' (ExpFunction)
    'toString' = '[function toString()]' (ExpFunction)
    'hasOwnProperty' = '[function hasOwnProperty()]' (ExpFunction)
    'push' = '[function push()]' (ExpFunction)
    'pop' = '[function pop()]' (ExpFunction)
    'concat' = '[function concat()]' (ExpFunction)
    'join' = '[function join()]' (ExpFunction)
    'reverse' = '[function reverse()]' (ExpFunction)
    'shift' = '[function shift()]' (ExpFunction)
    'unshift' = '[function unshift()]' (ExpFunction)
    'slice' = '[function slice()]' (ExpFunction)
    'splice' = '[function splice()]' (ExpFunction)
    'sort' = '[function sort()]' (ExpFunction)
    'indexOf' = '[function indexOf()]' (ExpFunction)
    'length' = '0' (NamedString)
  '0' = '[object Object]' (JsObject)
    'test3' = 'none1' (ExpOperation, string)
    '__proto__' = '[object Object]' (JsObject)
      'freeze' = '[function freeze()]' (ExpFunction)
      'isFrozen' = '[function isFrozen()]' (ExpFunction)
      'toString' = '[function toString()]' (ExpFunction)
      'hasOwnProperty' = '[function hasOwnProperty()]' (ExpFunction)
  '1' = '[object Object]' (JsObject)
    'test1' = 'none3' (ExpOperation, string)
    '__proto__' = '[object Object]' (JsObject) (already seen)
Additional Information What you see is the length property of the prototype, not of the object itself.

The member "length" is a special property. Try to display arr.length
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-11-08 13:56 srgdts New Issue
2016-04-29 13:43 paulc Assigned To => paulc
2016-04-29 13:43 paulc Status new => feedback
2016-04-29 13:43 paulc Resolution open => no change required
2016-04-29 13:43 paulc Additional Information Updated

Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker