jfryman/puppet-nginx — pull request #93 by xcompass (2013-07-18 21:39:44+00:00)
Title: Fix undefined method `sort_by' error from vhost_location_empty.erb

I got the following error:

Filepath: /etc/puppet/modules/common/nginx/templates/vhost/vhost_location_empty.erb
Line: 2
Detail: undefined method `sort_by' for nil:NilClass
at /etc/puppet/modules/common/nginx/manifests/resource/location.pp:133 on node xxxxxx

In the template, we should check if the variable is defined before use it.