Check if $order[$key] does not exist to fix php notices