Some classes are now static.
This can generate a message (class Input) in Contao 3:
Fatal error: Call to a member function post () on a non-object
Now there are 2 variants for the solution.
Contao 2 compatible:
Using $this->import(...);
Example for input:
Old:
Code:
$this->Input->post (...);
New:
Code:
$this->import('Input');
$this->Input->post(...);
For Contao 3 and with namespace usage (and thus functionally only there) to change the input line as follows:
Other examples:
Code:
$this->Environment->httpUserAgent
//change in
\Environment::get('httpUserAgent')
$this->Environment->remoteAddr
//change in
\Environment::get('remoteAddr')
$this->Environment->ip
//change in
\Environment::get('ip')
$this->Environment->request
//change in
\Environment::get('request')
Bookmarks