Ticket #391 (closed defect: fixed)
Bug avec fichiers de taille 0 dans class.unzip.php
Reported by: | pep | Owned by: | olivier |
---|---|---|---|
Priority: | high | Milestone: | 2.1 |
Component: | module:core | Version: | 2.0 |
Severity: | major | Keywords: | clearbricks |
Cc: |
Description
La classe unzip lance une exception dès qu'elle rencontre un fichier vide.
Le problème est tout bêtement au niveau du test de la valeur de retour de file_put_contents
Lignes : 207-210
$r = @file_put_contents($target,$content); if (!$r) { throw new Exception(__('Unable to write destination file.')); }
à remplacer par
$r = @file_put_contents($target,$content); if ($r === false) { throw new Exception(__('Unable to write destination file.')); }
Change History
Note: See
TracTickets for help on using
tickets.
Résolu par la révision 171 de Clearbricks.