-1

Installed Kunena forum in joomla website. Following error occurred while clicking Profile in Kunena forum component !

Fatal error: Unsupported operand types in /home/irfan123/public_html/libraries/cms/router/router.php on line 192

    // Process the parsed variables based on custom defined rules
    $vars = $this->_processParseRules($uri);

    // Parse RAW URL
    if ($this->_mode == JROUTER_MODE_RAW)
    {
        $vars += $this->_parseRawRoute($uri);
    }

    // Parse SEF URL
    if ($this->_mode == JROUTER_MODE_SEF)
    {
        $vars += $this->_parseSefRoute($uri);   /* line 192  */
    }

    return array_merge($this->getVars(), $vars);
}

Warning: array_merge(): Argument #2 is not an array in /home/irfan123/public_html/libraries/cms/router/router.php on line 298

/**
 * Set the router variable array
 *
 * @param   array    $vars   An associative array with variables
 * @param   boolean  $merge  If True, the array will be merged instead of overwritten
 *
 * @return  void
 *
 * @since   1.5
 */
public function setVars($vars = array(), $merge = true)
{
    if ($merge)
    {
        $this->_vars = array_merge($this->_vars, $vars);    /*  line 298  */
    }
    else
    {
        $this->_vars = $vars;
    }
}
Nimantha
  • 6,405
  • 6
  • 28
  • 69
Irfan Alam
  • 476
  • 3
  • 9
  • 25

2 Answers2

0

on Line 192 your problem is that you are trying to add to the value of $vars with whatever the return result of $this->_parseSefRoute($uri) The return type of the parseSefRoute function and $vars are not the same type, so you cannot "add" them.

The second error is fairly self explanatory, $vars there is not an array, and therefore cannot be merged with the other array stated.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jhecht
  • 4,407
  • 1
  • 26
  • 44
  • I searched on google about it, and actually I search every time first on google if I ran into a problem. But this problem was not found after repeated search, So I asked this question here. Ya of course this website is very helpful in finding answers. – Irfan Alam Jun 05 '14 at 17:00
  • I don't have the system installed. If you were not the one who wrote the code, try un-installing and re-installing it. Otherwise I can't tell you why those two things aren't the right variable type. – Jhecht Jun 05 '14 at 20:06
  • I will uninstall it completely and will search for another forum package ! Vanilla ! – Irfan Alam Jun 07 '14 at 06:56
0

Just came across this myself. Not necessarily a code level issue but rather cross extension integration.

I am also using AlphaUserPoints, which integrates with Kunena, and noticed the Kunena user profile link was pointing to AUP user profile. I was getting the same error because I never made the AUP Profile menu item in Joomla's Menu Manager.

If you don't have AUP, the only other thing can tell ya is to get it, install it and add the AUP Profile Page; that should fix your problem.

Also, here's a reference link to a similar post on Kunena's Forum:

http://www.kunena.org/forum/201-AlphaUserPoints/129561-k-3-0-4-alphauserpoints-integration-plugin-problems