Bug #1762

search.php - $forumread undefined

Added by Stefan T. 7 months ago. Updated 3 months ago.

Status:Closed Start date:11/01/2011
Priority:Normal Due date:
Assignee:Tom Moore % Done:

100%

Category:Search
Target version:1.6.7
Reproducibility:Always Database Type:
Reported In MyBB Version:1.6.4 Database Version:
PHP Version: SQA assignments:Stefan T.
Browser:

Description

            if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $post['thread_lastpost'] > $forumread)
            {
                $cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
                if($post['thread_lastpost'] > $cutoff)
                {
                    if($post['thread_lastread'])
                    {
                        $last_read = $post['thread_lastread'];
                    }
                    else
                    {
                        $last_read = 1;
                    }
                }
            }

            if($dot_icon[$post['tid']])
            {
                $folder = "dot_";
                $folder_label .= $lang->icon_dot;
            }

            if(!$last_read)
            {
                $readcookie = $threadread = my_get_array_cookie("threadread", $post['tid']);
                if($readcookie > $forumread)
                {
                    $last_read = $readcookie;
                }
                elseif($forumread > $mybb->user['lastvisit'])
                {
                    $last_read = $forumread;
                }
                else
                {
                    $last_read = $mybb->user['lastvisit'];
                }
            }

$forumread is not defined.

Associated revisions

Revision 5673
Added by Tom Moore 6 months ago

Fixes search.php - $forumread undefined (fixes #1762)

History

#1 Updated by Nathan Malcolm 7 months ago

The Cross Reference of MyBB 1.6.4 confirms this. It's referenced 4 times in search.php, but hasn't been defined anywhere.

#2 Updated by Tom Moore 6 months ago

  • Status changed from New to Assigned
  • Assignee set to Tom Moore
  • Target version set to 1.6.6

#3 Updated by Tom Moore 6 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r5673.

#4 Updated by Stefan T. 5 months ago

  • Status changed from Resolved to Closed

#5 Updated by Tom Moore 3 months ago

  • Target version changed from 1.6.6 to 1.6.7

Also available in: Atom PDF