1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-10-13 06:14:37 +02:00

Fix support entry name '0'

This commit is contained in:
Ne-Lexa
2016-09-26 22:30:30 +03:00
parent 47d308605e
commit 015166d165
2 changed files with 30 additions and 17 deletions

View File

@@ -401,7 +401,7 @@ class ZipFile implements \Countable, \ArrayAccess, \Iterator, ZipConstants
*/
public static function openFromString($data)
{
if (empty($data)) {
if (null === $data || strlen($data) === 0) {
throw new IllegalArgumentException("Data not available");
}
if (!($handle = fopen('php://temp', 'r+b'))) {