If all we're doing is ensuring that a value exists for $sort, then default value should be set in the assignment via optional_param() on line 18.