collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
295 stars 167 forks source link

Possibility of bug on 1.8 $vs_template_path in app/helpers/printHelper.php #1430

Closed andrea-favarin closed 1 year ago

andrea-favarin commented 1 year ago

HI.

We have installed Providence, version 1.8, from the develop branch.

In the file "app/helpers/printHelper.php", on line 214 we find a variable set with the path of a file (.php):

$vs_template_path = "{$vs_template_path}/{$ps_template}.php";

But then, on line 222, this variable is used as if it contained the path of a directory (adding /* + extension):

*Glob::glob("{$vs_template_path}/.{php,css}", Glob::GLOB_BRACE)**

In fact, the application returns the error:

2023-05-29 3:30:33 - ERROR --> Laminas\Stdlib\Exception\RuntimeException: glob('/data/www/html/cola/app/printTemplates/results/pdfStart.php/*.{php, css}', 102

It appears to be a bug. By removing "/*.{php,css}" the application works again.

collectiveaccess commented 1 year ago

Thanks for pointing this out. It's an artifact of a bad merge. Will fix.