0
votes

Why do I get this error in my Joomla Frontend Controller

Strict Standards: Declaration of FindmeControllerToolbox::display() should be compatible with JControllerAdmin::display($cachable = false, $urlparams = Array) in /Users/danielmauch/Sites/dualda_j3/components/com_findme/controllers/toolbox.php on line 15

class FindmeControllerToolbox extends JControllerLegacy
{
    function __construct()
    {
        parent::__construct();
        //echo '<br>Controller: Toolbox';
    }

    function display()
    {

        JRequest::setVar('view', 'toolbox');

        $view='toolbox';
        $v = $this->getView($view, 'html');
        $v->setModel($this->getModel($view), true); 
        //$v->setModel($this->getModel('register'));
        $v->display();
        return $this;


    }
1
This is a 3rd party extensions, therefore you should contact the developerLodder
You get it because ... it is not compatible, meaning that display() should be display($cachable = false, $urlparams = Array()). You should ask the developers to fix or send them a patch if it's an open project.Elin
@Elin - you should put that in an answer. :DCraig

1 Answers

0
votes

Yes, this is because whenever the Strict Standards encounter then the number of arguments and their type in the Overwritten method should be same as in parent class method. If in parent class the argument is defined as - -

public function ParentModel(JModel $model) {
    // Core Code
}

Then your function should be like - -

// **Then $obj should strictly be an object of class JModel**
public function MyModel($obj) {
    // Your Code
}