16 - 12 - 2018
Przełącznik języka
Tools
This Site
Security
CMS
Hardware
Backup
Uncategorised
useful sites
Databases
Emulators
Powershell
Storage Array
Active Directory
SEO
DNS
Guides
Antivirus program
Linux
Foto
Licznik
1.png4.png2.png0.png9.png4.png0.png
Today111
Yesterday691
This week5744
This month10758
Total1420940

Visitor Info

  • IP: 18.212.93.234
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

4
Online

Sunday, 16 December 2018 04:51
Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Joomla 3.6 - 3.7 - white page in backend - Fatal error login.php

I have an error on backend in Joomla website. When I insert user and password I can see this errors:

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

 

Error - login.php - size 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';

 correct login.php - size - 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 solving - changing the login.php file