Login   Register  
PHP Classes
elePHPant
Icontem

Misleading error message returned

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Simple XLSX  >  All threads  >  Misleading error message returned  >  (Un) Subscribe thread alerts  
Subject:Misleading error message returned
Summary:"Missing _rels" returned when file is unreadable
Messages:2
Author:Frank
Date:2013-05-23 13:38:39
Update:2013-05-24 02:38:40
 

  1. Misleading error message returned   Reply   Report abuse  
Picture of Frank
Frank
2013-05-23 13:38:40
This applies to simple xlsx version 0.6.4 from the website.

The xlsx-File I tried to read with the package had wrong permissions and was unreadable for the web server, so _unzip immediately returned with error set to "file not found".

Unfortunately, this is not noticed in __construct - so parse is called, which in turn realizes that _rels is not available, and overwrites the error message to "missing _rels". Since there are several posts about similar problems, I think with most of these actually something went wrong in _unzip - whatever goes wrong, the nice error message is simply overwritten.

I propose to check the return code of unzip in __construct (or somewhere else).

Best wishes, Frank

  2. Re: Misleading error message returned   Reply   Report abuse  
Picture of Sergey Shuchkin
Sergey Shuchkin
2013-05-24 02:38:41 - In reply to message 1 from Frank
i'll add this behavior in next release