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

  1. Open your CPanel or any other Hosting client software. Once done, navigate to the path where you’ve your Joomla powered site.
  2. 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.
  3. 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);
    }
    }
  4. That will solve your problem.