I want to update PHP from 5.6 to 7.0 but I get a 500 HTML Error and in the logs it says:
[Mon Oct 22 09:42:14 2018] [-:error] [pid 12784] [client 5.158.158.123] [host www.mydomain.de] PHP Fatal error: Switch statements may only contain one default clause in /is/htdocs/wp12731216_QEO0DONMD6/www/typo3conf/ext/dam/lib/class.tx_dam_db.php on line 547
So I looked into the file and found as it says a dublicate default: statement:
if ($appendType = $TCA['tx_dam']['columns'][$field]['config']['appendType']) {
$appended = true;
switch($appendType) {
case 'space':
$rowUpdate[$field] = trim($row[$field].' '.$value);
break;
case 'newline':
$rowUpdate[$field] = $row[$field].($row[$field]?"
":'').$value;
break;
case 'comma':
$rowUpdate[$field] = $row[$field].($row[$field]?', ':'').$value;
break;
case 'charDef':
default:
list($type, $appendChar) = explode(':', $appendType);
$rowUpdate[$field] = $appendChar.$value;
break;
default:
$appended = false;
break;
}
}
So my Question is, is there a solution? Can I just edit this file and remove the last default statement? Or should I update to a different PHP Version?
So I found the solution myself after a while...
I had to update the Extension where the file with the error comes from.