Error: E_WARNING - trim() expects parameter 1 to be string, array given

hello all!

i’m having a problem in getting my local files to work on the server. each time i try to access the online version (or the admin panel) i get same error: “E_WARNING - trim() expects parameter 1 to be string, array given”.

it doesn’t matter if the files are cloned via github, or zipped and uploaded via sftp. i tried to look up the error message in logs/ but i have no idea where to start debugging, since i don’t use the trim() command in my templates…

my server is running php 7.0.2 and i had a working site before (albeit with grav 1.0.8). so maybe the update is due to me upgrading locally to grav 1.0.9?

thanks a million for your feedback!

Is it possible to zip up your site and PM me a link to download it and try it. I need to see if it’s a config thing or a server thing.

Ok works for me too. Must be a server thing. Do you get any line number on that error? Perhaps turn on the displaying of detailed errors in the system.yaml?

  display: true  

Or check the logs/grav.log for more information?

ah! thanks to your hints i think i found the problem. i was trying to set two different home-routes in system.yaml
en: '/welcome’
fr: ’ /bienvenue’
apparently this produced the problem, as it turned the home-string into an array. now that i changed it to
alias: '/welcome’
it works perfectly.

but, how would i go on about, setting two different routes for different language versions?

ok, to wrap this up i’m going to copy paste rhuksters solution into this thread:

"I think i found the problem - try changing this in your user/config/system.yaml
en: /welcome
fr: /bienvenue
en: /welcome
fr: /bienvenue

note the aliasES
That should resolve it."

… and it did :slight_smile: thank you!