1
votes

I am installing an extension in Joomla 3.1. It's working fine but on every page the extension is assigned for it is showing error " Strict Standards: Declaration of JSJobsController::display() should be compatible with JControllerLegacy::display($cachable = false, $urlparams = Array) in C:\xampp\htdocs\SysMind\administrator\components\com_jsjobs\controller.php on line 25 "

The code is -

class JSJobsControllerJsjobs extends JControllerLegacy
{
    function __construct()
    { 
        //This curly bracket is the line 25 in my code.
        parent :: __construct();

        $this->registerTask('add', 'edit');
    }   

    function editsubcategories()
    {
        JRequest :: setVar('layout', 'formsubcategory');
        JRequest :: setVar('view', 'application');
        $this->display();
    }

    function edit()
    {
        $cur_layout = $_SESSION['cur_layout'];
        JRequest :: setVar('view', 'application');
        JRequest :: setVar('hidemainmenu', 1);
    }
}
2
Where's public function display($cachable = false, $urlparams = false){} in your JSJobsControllerJsjobs class ?McRui

2 Answers

3
votes

Inside com_jsjobs\controller.php you probably have a method display().

You need to update it's declaration with:

public function display($cachable = false, $urlparams = array())

1
votes

You have to tell your JSJobsController display method, that you don't use any urlparams with this declaration:

public function display($cachable = false, $urlparams = false)