Skip to content

Commit

Permalink
Check for a blog context before trying to use a blog ID for the Entry…
Browse files Browse the repository at this point in the history
… or Page field type.
  • Loading branch information
danwolfgang committed May 7, 2015
1 parent 128547e commit 5358a5d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ sub type_entry_or_page {
sub _type_object {
my $app = shift;
my ( $ctx, $field_id, $field, $value ) = @_;
my $blog_id = $field->{all_blogs} ? 0 : $app->blog->id;
my $blog_id = $field->{all_blogs} ? 0 :
$app->blog ? $app->blog->id : 0;
my $obj_class = $ctx->stash('object_class') || '';
my $list_method = 'ca_config_' . $obj_class;
my $out;
Expand Down

0 comments on commit 5358a5d

Please sign in to comment.