Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] override style in forum
#1
MyBB version 1.4.1

Steps to reproduce:

1. Default style is "Style A".

2. I set "Style B" for one forum and checked "override" flag.

3. Go to adding new thread on this forum. I see "Style B" - OK.

4. Fill in subject and leave message empty, submit the form.

5. You will go back to new thread page (message cannot be empty), I see "Style A" now - not OK.

6. It's because there is a field "tid" with empty value in the form on new thread page and the condition
if(isset($mybb->input['tid']))
in line #138 in file 'global.php' is true however $mybb->input['tid'] is empty. It should be
if(isset($mybb->input['tid']) && $mybb->input['tid'] > 0)
or
if(!empty($mybb->input['tid']))
or sth like this.

The following plugin also helps:
function wc_remove_empty_tid() {
    global $mybb;
    if (isset($mybb->input['tid']) && empty($mybb->input['tid'])) {
        unset($mybb->input['tid']);
    }
}

$plugins->add_hook("global_start", "wc_remove_empty_tid");
#2
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.


Forum Jump:


Users browsing this thread: 1 Guest(s)