From 0a46f25c3cb941415a0f73ce74a4e3757192e784 Mon Sep 17 00:00:00 2001 From: Pierre Radermecker Date: Wed, 24 Sep 2014 02:06:15 +0200 Subject: [PATCH] Guard against undef --- manifests/resource/location.pp | 4 +++- manifests/resource/vhost.pp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index 353e5b192..72724271d 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -199,7 +199,9 @@ if ($proxy != undef) { validate_string($proxy) } - validate_string($proxy_redirect) + if ($proxy_redirect != undef) { + validate_string($proxy_redirect) + } validate_string($proxy_read_timeout) validate_string($proxy_connect_timeout) validate_array($proxy_set_header) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index 1214aacf1..ba607f3c5 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -287,7 +287,9 @@ validate_string($proxy) } validate_string($proxy_read_timeout) - validate_string($proxy_redirect) + if ($proxy_redirect != undef) { + validate_string($proxy_redirect) + } validate_array($proxy_set_header) if ($proxy_cache != false) { validate_string($proxy_cache)