extcode / tcpdf

0 stars 9 forks source link

Template paths are evaluated in the wrong order #10

Open garfieldius opened 3 years ago

garfieldius commented 3 years ago

Method \Extcode\TCPDF\Service\TsTCPDF::getStandaloneView, line 234, iterates over the configured templateRootPaths settings. Because the paths are sorted descending by key, a configured override comes first, the default last, resetting the template path of the override. In effect, the templates are evaluated the other way around, than extbase/fluid do by default.

The method should use an array_reverse call on the templateRootPaths setting or break out of the loop on the first found template.