View Single Post
  #8  
Old 03-03-2011, 05:13 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Probably bad form to check if a variable exists with

if (var) {...}

because it's coercing the variable to an integer, which could technically coerce to 0 and make the if fail in certain cases where the variable does exist.

Perhaps if (var.type() != -1) {...} is the best way to do it.
Reply With Quote