PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : parsing Fehler



klaus_harrer
19-03-2017, 14:08
Hallo

Ich habe mir gerade XODA installiert.
Das ganze läuft unter nginx.

Leider hat eine php Seite einen Fehler.


PHP Parse error: syntax error, unexpected end of file in /var/www/htdocs/xoda-0.7.0/functions.php on line 1248

Hier die fehlerhafte Stelle:


function xd_set_shared ($filename, $options) {
xd_check_traverse ($filename);
$shared_file = xd_sharedfile_of ($filename);
if (file_exists ($shared_file)) { include ($shared_file); }
$s['key'] = $options['key'];
if ($options['spassword']) { $s['password'] = password_hash ($options['password'], PASSWORD_DEFAULT, ['cost' => 12]); }
if ($options['sdatetime']) { $s['datetime'] = $options['datetime']; }
if ($options['sedit']) { $s['edit'] = $options['edit']; }
if (strlen ($s['key'])) { $shared_file_content = "<?php\n\$_shared = " . var_export ($s, true) . ";\n?>"; }
else { unlink ($shared_file); }
if (! xd_file_put_content ($shared_file, $shared_file_content)) {
$_SESSION['message'] = 'ERROR: Sharing of "' . xd_basename ($filename) . '" could not be set!';
header ('Location:' . $_SERVER['HTTP_REFERER']);
exit;
}
return true;
}
?>


Leider kenne ich mich mit PHP nicht so gut aus.
Ich vermute die Stelle bei.

if (strlen ($s['key'])) { $shared_file_content = "<?php\n\$_shared = " . var_export ($s, true) . ";\n?>"; }

Hat da jemand eine Idee wie man das ;\n?> maskieren kann?

Vielen Dank
Klaus