diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2008-12-13 11:13:45 +0100 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2008-12-13 11:13:45 +0100 |
commit | 93989d3f5315015f42639f1143568d4a4831835a (patch) | |
tree | 42d9f0390e2f28428a246fcc493b3edc687c4056 | |
parent | 64677e82098a4aaba82d26a2d73481d3fe912440 (diff) | |
download | exilog-93989d3f5315015f42639f1143568d4a4831835a.zip exilog-93989d3f5315015f42639f1143568d4a4831835a.tar.gz exilog-93989d3f5315015f42639f1143568d4a4831835a.tar.bz2 |
check if webroot parameter has been set, before using a regexp on it
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r-- | lib/exilog_config.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/exilog_config.pm b/lib/exilog_config.pm index 577812d..50feb24 100644 --- a/lib/exilog_config.pm +++ b/lib/exilog_config.pm @@ -67,7 +67,10 @@ if ( ! -r $cfg_file ) { $config = _read_ph($cfg_file); # check if user forgots to add a trailing slash - if so, add it here -if ( $config->{web}->{webroot} !~ /\/$/ ) { +if ( + defined($config->{web}->{webroot}) && + $config->{web}->{webroot} !~ /\/$/ + ) { $config->{web}->{webroot}.="/"; } |