I think the point of this change is to allow 'w' to be optional when 'h' is given, so although $w is mandatory it could be zero.  [ I haven't checked the code so don't know if a ($w || $h) check is necessary to ensure at least one has a non-zero value ]