Forum

[SOLVED] Error when...
 
Notifications
Clear all

[SOLVED] Error when trying to download documents

5 Posts
2 Users
0 Reactions
3,606 Views
(@louisc)
Posts: 58
Active Member
Topic starter
 
[#2784]

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.


 
Posted : 03 Dec 2015 13H26
(@babynus)
Posts: 14952
Member Admin
 

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.


 
Posted : 03 Dec 2015 14H27
(@louisc)
Posts: 58
Active Member
Topic starter
 

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.


 
Posted : 03 Dec 2015 16H18
(@babynus)
Posts: 14952
Member Admin
 

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')) {

 
Posted : 03 Dec 2015 17H10
(@louisc)
Posts: 58
Active Member
Topic starter
 

This patch works well.

Thank you ! :cheer:


 
Posted : 03 Dec 2015 19H21
Share:

Scroll to Top