Joomla 3.6 - 3.7 - biała strona administratora - Fatal error login.php
Joomla 3.6 - 3.7 - biała strona administratora - Fatal error login.php
Błąd na stronie administracyjnej joomla - po wpisaniu hasła strona administratora joomla się nie wyświetla.
W logach znajdujemy następujący błąd:
Notice: Undefined offset: 0 in /www/site/libraries/vendor/joomla/input/src/Input.php on line 313, referer: http://webpage/administrator
Fatal error: Call to a member function get() on null in /www/administrator/components/com_login/models/login.php on line 33 referer: http://webpage/administrator
Błądny skrypt - login.php - rozmiar 4525 B
/**
* @package Joomla.Administrator
* @subpackage com_login
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights r
eserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
/**
* Login Model
*
* @since 1.5
*/
class LoginModelLogin extends JModelLegacy
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
$input = JFactory::getApplication()->input->getInputForRequestMethod();$credentials = array(
'username' => $input->get('username', '', 'USERNAME'),
'password' => $input->get('passwd', '', 'RAW'),
'secretkey' => $input->get('secretkey', '', 'RAW'),
);$this->setState('credentials', $credentials);
// Check for return URL from the request first.
if ($return = $input->get('return', '', 'BASE64'))
{
$return = base64_decode($return);if (!JUri::isInternal($return))
{
$return = '';
}
}// Set the return URL if empty.
if (empty($return))
{
$return = 'index.php';
poprawny login.php - rozmiar - 4579 B
/**
* @package Joomla.Administrator
* @subpackage com_login
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
/**
* Login Model
*
* @since 1.5
*/
class LoginModelLogin extends JModelLegacy
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
$app = JFactory::getApplication();$input = $app->input;
$method = $input->getMethod();$credentials = array(
'username' => $input->$method->get('username', '', 'USERNAME'),
'password' => $input->$method->get('passwd', '', 'RAW'),
'secretkey' => $input->$method->get('secretkey', '', 'RAW'),
);
$this->setState('credentials', $credentials);// Check for return URL from the request first.
if ($return = $input->$method->get('return', '', 'BASE64'))
{
$return = base64_decode($return);if (!JUri::isInternal($return))
{
$return = '';
}
}// Set the return URL if empty.
if (empty($return))
{
$return = 'index.php';
problem rozwiązany należy zmienić plik login.php - można przegrać go ze starszej wersji joomla