I finally found a solution in older posts, leaving this here in case someone else comes across the same issue: The above quoted line is not part of wordpress core, must have been added by a plugin or something else, even if disabling plugins didn’t resolve my issue.
After making a copy of the wp-config.php as backup, I simply deleted the above mentioned piece of code with the create_function and can now log into my backend again.
Thank you. I tried but it doesn’t work. I’m not sure exactly which parantheses and quotes I need to keep in the syntax, I probably messed it up there so I reverted it back to the original.
This is what it says:
if(is_admin()) {
add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));