1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Fix typo in post.php that breaks Tesseract OCR

Fixes a typo in post.php that causes an uninitialized variable "$value"
to be referenced instead of the correct variable "$txt". This caused all
attempts to use the Tesseract OCR feature to fail with an error.
This commit is contained in:
seisatsu 2024-09-06 15:23:37 -05:00
parent 1672646213
commit 43b926c41b

View File

@ -1197,7 +1197,7 @@ if (isset($_POST['delete'])) {
if ($txt !== '') {
// This one has an effect, that the body is appended to a post body. So you can write a correct
// spamfilter.
$post['body_nomarkup'] .= "<tinyboard ocr image $key>" . htmlspecialchars($value) . "</tinyboard>";
$post['body_nomarkup'] .= "<tinyboard ocr image $key>" . htmlspecialchars($txt) . "</tinyboard>";
}
} catch (RuntimeException $e) {
$context->get(Log::class)->log(Log::ERROR, "Could not OCR image: {$e->getMessage()}");