e107inc/e107

View on GitHub
e107_plugins/forum/shortcodes/batch/forum_shortcodes.php

Summary

Maintainability
A
1 hr
Test Coverage
C
74%

Avoid too many return statements within this method.
Open

                return $lastpost_username." <a href='".$url."'>".$relativeDate.'</a>';
Severity: Major
Found in e107_plugins/forum/shortcodes/batch/forum_shortcodes.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                        return $lastpost['thread_name'];
    Severity: Major
    Found in e107_plugins/forum/shortcodes/batch/forum_shortcodes.php - About 30 mins to fix

      Reference to undeclared constant \USERVIEWED
      Open

                      $tmp = explode(".", USERVIEWED); // List of numbers, separated by single period

      Argument 2 (replace) is int but \str_replace() takes array|string
      Open

              return str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_topics ".($total_topics == 1 ? LAN_FORUM_0032 : LAN_FORUM_0033).", $total_replies ".($total_replies == 1 ? LAN_FORUM_0034 : LAN_FORUM_0035).")

      Argument 1 (datestamp) is string but \e_parse::toDate() takes int defined at /code/e107_handlers/e_parse_class.php:5059
      Open

              $relativeDate = e107::getParser()->toDate($lastpost_datestamp, $format);

      Call to undeclared function \forum_rules()
      Open

              $this->forum_rules = function_exists('forum_rules') ? forum_rules('check') : '';

      Argument 2 (key) is array{name:false|mixed|string,id:false|mixed|string} but \e107::url() takes string defined at /code/e107_handlers/e107_class.php:4225
      Open

              $lastpost_username = empty($this->var['user_name']) ? e107::getParser()->toHTML($this->var['forum_lastpost_user_anon']) : "<a href='".e107::url('user/profile/view', array('name' => $this->var['user_name'], 'id' => $this->var['forum_lastpost_user']))."'>{$this->var['user_name']}</a>";

      Argument 2 (key) is array{name:mixed,id:mixed} but \e107::url() takes string defined at /code/e107_handlers/e107_class.php:4225
      Open

              $lastpost_username = empty($this->var['user_name']) ? e107::getParser()->toHTML($this->var['forum_lastpost_user_anon']) : "<a href='".e107::url('user/profile/view', array('name' => $this->var['user_name'], 'id' => $this->var['forum_lastpost_user']))."'>{$this->var['user_name']}</a>";

      Call to deprecated function \getperms() defined at /code/class2.php:1322
      Open

                  if(!empty($this->prefs['attach']) && (check_class($pref['upload_class']) || getperms('0')))

      There are no issues that match your filters.

      Category
      Status