Nl2br() expects parameter 1 to be string, array given

After doing a upgrade (stepping through many many *.sh scripts) I cannot load the modules page. Done the basics of rebooting and reloading different modules. I can paste anymore details you need, the “copy to clipboard” button doesnt seem to work on the error page.

Here is a snip of one of the errors.

@ ob_flush();

function format_changelog($changelog) {
$changelog = nl2br($changelog);
$changelog = preg_replace(’/(\d+(.\d+|.\d+beta\d+|.\d+alpha\d+|.\d+rc\d+|.\d+RC\d+)+):/’, ‘$0’, $changelog);
$changelog = preg_replace(’/*(\d+(.\d+|.\d+beta\d+|.\d+alpha\d+|.\d+rc\d+|.\d+RC\d+)+)*/’, ‘$1:’, $changelog);