Skip to content

Commit

Permalink
MDL-71394 core_blog: fix incorrect default setting in form
Browse files Browse the repository at this point in the history
the keys of the options are strings, in PHP8 strings are compared with 0 differently
  • Loading branch information
marinaglancy committed Apr 21, 2021
1 parent 9600bec commit 855d624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blog/edit_form.php
Expand Up @@ -63,7 +63,7 @@ public function definition() {

$mform->addElement('select', 'publishstate', get_string('publishto', 'blog'), $publishstates);
$mform->addHelpButton('publishstate', 'publishto', 'blog');
$mform->setDefault('publishstate', 0);
$mform->setDefault('publishstate', 'site');

if (core_tag_tag::is_enabled('core', 'post')) {
$mform->addElement('header', 'tagshdr', get_string('tags', 'tag'));
Expand Down

0 comments on commit 855d624

Please sign in to comment.