Fix arguments to dol_print_error

This commit is contained in:
MDW 2024-03-26 12:51:04 +01:00
parent d885b2d459
commit 586de61d44
No known key found for this signature in database

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -191,7 +192,7 @@ if (!$accessallowed) {
if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) {
dol_syslog("Refused to deliver file ".$original_file);
$file = basename($original_file); // Do no show plain path of original_file in shown error message
dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file));
dol_print_error(null, $langs->trans("ErrorFileNameInvalid", $file));
exit;
}