Skip to content

Commit

Permalink
Item15029: getPreferences() might sometimes fails
Browse files Browse the repository at this point in the history
... when called too early
  • Loading branch information
MichaelDaum committed Jul 7, 2021
1 parent 4e23df6 commit 0a3ae1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/lib/Foswiki/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ sub getPreference {
$this->{_preferences} =
$this->{_session}->{prefs}->loadPreferences($this);
}
return unless $this->{_preferences};
return $this->{_preferences}->get($key);
}

Expand Down Expand Up @@ -3935,7 +3936,7 @@ sub dataDecode {
__END__
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
Copyright (C) 2008-2011 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2008-2021 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down

0 comments on commit 0a3ae1b

Please sign in to comment.