PHP - Recoverable Error Object of class class@anonymous could not be converted to string

PHP - Recoverable Error Object of class class@anonymous could not be converted to string

Dobrý den,

poradí prosím někdo co s chybou PHP - Recoverable Error Object of class class@anonymous could not be converted to string?

24:        public function __construct(Settings $modelSettings)
25:        {
26:            $this->$modelSettings    = $modelSettings;
27:        }

Já jsem asi slepej.

ODPOVĚĎ

Dobrý den,

chybu PHP - Recoverable Error Object of class class@anonymous could not be converted to string Vám způsobuje znak $ v $modelSettings, má to být takto:

24: public function __construct(Settings $modelSettings)
25: {
26:   $this->modelSettings = $modelSettings;
27: }
Jak se ti článek líbil?

Komentáře (0)

Přidat komentář