Hello,
When trying to download uploaded documents (PDF files in my case), I don't get anything.
Looking at the logs, I get an error when trying to dowload the PDF file :
2015-12-03 11:13:54.200 ** ERROR ** ERROR **
2015-12-03 11:13:54.200 ** ERROR ** on file '/var/www/projeqtor/model/persistence/SqlElement.php' at line (4005)
2015-12-03 11:13:54.200 ** ERROR ***** cause = is_a() expects exactly 2 parameters, 3 given
I tried for some PDF files uploaded on the project, and got exactly the same error each time.
Looking at the filenames of the different PDF files, there may be a problem due to the file names : the project name is composed of a word starting with the µ character, so this character is present in the name of all PDF files uploaded. Maybe the error is due to the presence of this character in the filenames ?
Thanks for your answer.
It is a issue produced with PHP < 5.3
To have this work for PHP < 5.3, comment lines 4005 to 4007 in /model/persistence/SqlElement.php from
// if (! is_a($className, 'SqlElement', true )) {
// traceHack("Class '$className' does not extend SqlElement");
// }
Note that this mau introduce secuirity leak.
Better solution will be proposed in V5.2.
Thank you for your reactivity.
It is a issue produced with PHP < 5.3
That's strange as php version used is 5.3.3-7
To have this work for PHP < 5.3, comment lines 4005 to 4007 in /model/persistence/SqlElement.php from
// if (! is_a($className, 'SqlElement', true )) { // traceHack("Class '$className' does not extend SqlElement"); // }Note that this mau introduce secuirity leak.
Better solution will be proposed in V5.2.
Thank you, it is working correctly with this patch.
As I am still evaluating the solution (only part of the team is using it currently), the security leak is not that important and I will wait v5.2 to put Projeqtor into real production.
Final patch (will be included in V5.2)
Replace line 4005 in /model/persistence/SqlElement.php from
if (! is_a($className, 'SqlElement', true )) {
to
if (! is_subclass_of ( $className, 'SqlElement')) {
This patch works well.
Thank you ! :cheer: