Skip to content

Commit

Permalink
Merge pull request #9 from Rias500/patch-1
Browse files Browse the repository at this point in the history
Fix saving settings when only 1 locale is present
  • Loading branch information
Benjamin Grössing authored Feb 18, 2018
2 parents 8435197 + 42157bc commit c9df313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SitemapPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public function prepSettings($input)
}
}

$settings['currentLocaleOnly'] = $input['currentLocaleOnly'] == '1';
$settings['addAlternateUrls'] = $input['addAlternateUrls'] == '1';
$settings['currentLocaleOnly'] = isset($input['currentLocaleOnly']) && $input['currentLocaleOnly'] == '1';
$settings['addAlternateUrls'] = isset($input['addAlternateUrls']) && $input['addAlternateUrls'] == '1';

// Return the parsed settings ready for the database
return $settings;
Expand Down

0 comments on commit c9df313

Please sign in to comment.