Skip to content

Commit

Permalink
In LJ::User->create_community, don't call $u->set_default_style in te…
Browse files Browse the repository at this point in the history
…st environment.

This fixes a test-config related warning that printed during multiple tests, including t/content-filters.t:

"Can't call method "is_custom" on an undefined value at dw/cgi-bin/LJ/Customize.pm line 56."

The reason this was warning is because test environments don't set up styles.
  • Loading branch information
kareila committed Apr 17, 2015
1 parent f0a56c0 commit 258f152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgi-bin/LJ/User/Account.pm
Expand Up @@ -136,7 +136,7 @@ sub create_community {
$u->set_prop("nonmember_posting", $opts{nonmember_posting}+0);
$u->set_prop("moderated", $opts{moderated}+0);
$u->set_prop("adult_content", $opts{journal_adult_settings}) if LJ::is_enabled( 'adult_content' );
$u->set_default_style;
$u->set_default_style unless $LJ::_T_CONFIG;

my $admin = $opts{admin_userid} ?
LJ::load_userid( $opts{admin_userid} ) :
Expand Down

0 comments on commit 258f152

Please sign in to comment.