Warning: trim() expects parameter 1 to be string, array given in parameter.php on line 83 Print

  • 18

Fix for ‘Warning: trim() expects parameter 1’ Error

 

Warning: trim() expects parameter 1 to be string, array given in parameter.php on line 83

 

Open your CPanel or any other Hosting client software. Once done, navigate to the path where you’ve your Joomla powered site.
Then go inside \libraries\joomla\html and open up the parameter.php file in Code Edit view. I say code edit view because it will be easier for you to find the 83rd line which we are going to edit.
Find

if (trim($data))
{
$this->loadINI($data);
}

and Replace with:

if (gettype($data) == 'array')
{
foreach ($data as $data_string)
{
if (trim($data_string))
{
$this->loadINI($data_string);
}
}
}
else
{
if (trim($data))
{
$this->loadINI($data);
}
}

 

That will solve your problem.


Was this answer helpful?

« Back