0

I have a plugin for joomla 2.5 I want install it in joomla 3 but after installing I see this error :

Fatal error: Call to undefined method JController::getInstance() in /home/xxx/public_html/administrator/components/xxx/xxx.php on line 21

Line of error:

// Require specific controller if requested
if($controller = JRequest::getCmd('controller'))
{
    $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';

    if(file_exists($path))
    {
        require_once $path;
    }
    else
    {
        $controller = '';
    }
}
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
Danial Hosseini
  • 33
  • 1
  • 2
  • 9

1 Answers1

0

JController::getInstance() has been removed. Use JControllerLegacy::getInstance() instead.

mokiSRB
  • 1,132
  • 7
  • 16