It's possible the array in not being created and or the Serialnumber is not there.

Maybe something like
 Code:
$QUERY = WMIQUERY("SERIALNUMBER", "WIN32_BIOS")
if unbound($QUERY)>-1
  $SERIALNO=$QUERY[0]
else
  $SERIALNO="NONE/MISSING"
endif
_________________________
(... better days ahead)