1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-25 07:50:23 +01:00

Make post.php compatable with PHP 5.3x

Compatible with earlier versions of PHP. This should work on 5.4 too, but I haven't tested it.
This commit is contained in:
Reid 'Crafted 2014-05-13 21:23:06 +01:00
parent 5f626acd50
commit 7ee1875b8c

View File

@ -568,7 +568,8 @@ if (isset($_POST['delete'])) {
}
if ($output = shell_exec_error("cat $filenames | md5sum")) {
$hash = explode(' ', $output)[0];
$explodedvar = explode(' ', $output);
$hash = $explodedvar[0];
$post['filehash'] = $hash;
} elseif ($config['max_images'] === 1) {
$post['filehash'] = md5_file($upload);