aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-04-20 15:32:00 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-04-20 15:32:00 +0100
commit193697bde57ef2cfd0a46bb5a85fa98727378297 (patch)
treee8dd78b7202b78e3483ac65924e054a23127a594 /perllib/FixMyStreet/App.pm
parentf35b7eba0db02d16fa0aad5a78ee479165217e20 (diff)
parentb7099e8e513fe64ec183b1403515f46a7cc25f19 (diff)
Merge remote-tracking branch 'origin/1302-support-pngs'
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index af9dc1f9d..79ca7f9ee 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -246,7 +246,7 @@ sub setup_dev_overrides {
delete $params{$_} for grep { !m{^_override_} } keys %params;
# stop if there is nothing to add
- return 1 unless scalar keys %params;
+ return unless scalar keys %params;
# Check to see if we should clear all
if ( $params{_override_clear_all} ) {
@@ -270,14 +270,14 @@ sub setup_dev_overrides {
Checks the overrides for the value given and returns it if found, undef if not.
-Always returns undef unless on a staging site (avoids autovivifying overrides
-hash in session and so creating a session for all users).
+Always returns undef unless on a staging site and we already have a session
+(avoids autovivifying overrides hash and so creating a session for all users).
=cut
sub get_override {
my ( $c, $key ) = @_;
- return unless $c->config->{STAGING_SITE};
+ return unless $c->config->{STAGING_SITE} && $c->sessionid;
return $c->session->{overrides}->{$key};
}