aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index 81c2c33fc..416fb942a 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -112,7 +112,7 @@ sub determine_location_from_pc : Private {
# Log failure in a log db
try {
my $dbfile = FixMyStreet->path_to('../data/analytics.sqlite');
- my $db = DBI->connect("dbi:SQLite:dbname=$dbfile", undef, undef) or die "$DBI::errstr\n";
+ my $db = DBI->connect("dbi:SQLite:dbname=$dbfile", undef, undef, { PrintError => 0 }) or die "$DBI::errstr\n";
my $sth = $db->prepare("INSERT INTO location_searches_with_no_results
(datetime, cobrand, geocoder, url, user_input)
VALUES (?, ?, ?, ?, ?)") or die $db->errstr . "\n";
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index faa02f9fe..1a300da21 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1247,7 +1247,7 @@ sub check_for_errors : Private {
if ( $c->cobrand->allow_anonymous_reports ) {
my $anon_details = $c->cobrand->anonymous_account;
$report->user->email(undef) if $report->user->email eq $anon_details->{email};
- $report->name(undef) if $report->name eq $anon_details->{name};
+ $report->name(undef) if $report->name && $report->name eq $anon_details->{name};
}
return;