Session Fatal Error in some CLI Scripts: Difference between revisions
From Joomla! Documentation
Marked this version for translation |
version fix |
||
| Line 13: | Line 13: | ||
</translate> | </translate> | ||
{{tip|<translate><!--T:5--> | {{tip|<translate><!--T:5--> | ||
This pertains only to Joomla! version(s): '''3.5. | This pertains only to Joomla! version(s): '''3.5.0 and higher'''</translate>|title= | ||
<translate><!--T:6--> | <translate><!--T:6--> | ||
General Information</translate>}} | General Information</translate>}} | ||
Latest revision as of 18:32, 9 April 2016
Joomla!
3.5.1
Some CLI scripts started failing in Joomla 3.5.0 and higher
Errors reported
Fatal error: Call to a member function get() on null in /libraries/joomla/session/handler/joomla.php on line 70
Versions affected
General Information
This pertains only to Joomla! version(s): 3.5.0 and higher
What is the cause
A mass refactoring of the session library in Joomla 3.5.0 for future stability broke some old CLI scripts
How to fix
Ensure that you call the session initialise method with:
$session->initialise()
ensuring that the first parameter is a JInput object (which should be retrievable from the application or you can create a new one). For more information please read the method documentation at https://github.com/joomla/joomla-cms/blob/3.5.0/libraries/joomla/session/session.php#L464