diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index be499ff3f..bcddbe96e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,6 @@ 7.5.10 - fix: Syntax error in GetCsMail + - fix: Trapped an exception for corrupt config files. - fixed: Thingy: field types not in alphabetical order - fixed: Thingy: Text, File and Hidden field types listed twice (Yung Han Khoe) - fixed: Thingy: subtext is not displayed diff --git a/lib/Spectre/Admin.pm b/lib/Spectre/Admin.pm index c7a55cc27..3661ef4f0 100644 --- a/lib/Spectre/Admin.pm +++ b/lib/Spectre/Admin.pm @@ -135,6 +135,7 @@ Fetches the site from each defined site, and loads it into the Workflow and Cron sub loadSiteData { my ( $kernel, $self) = @_[ KERNEL, OBJECT ]; my $configs = WebGUI::Config->readAllConfigs($self->{_config}->getWebguiRoot); + $self->debug("Reading site configs."); foreach my $key (keys %{$configs}) { next if $key =~ m/^demo/; $self->debug("Fetching site data for $key"); diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index 2ea2cba73..af9777cef 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -191,7 +191,10 @@ sub readAllConfigs { || $file =~ /^\./ || $file eq 'log.conf' || $file eq 'spectre.conf'; - $configs{$file} = WebGUI::Config->new($webguiPath,$file); + $configs{$file} = eval{WebGUI::Config->new($webguiPath,$file)}; + if ($@) { + warn "Config file ".$file." looks to be corrupt or have a syntax error."; + } } return \%configs; }