Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #12320 Notice raised on NULL meta-data
Submitted: 2007-10-24 07:59 UTC
From: farell Assigned:
Status: Open Package: PHP_Archive (version 0.11.3)
PHP Version: 5.2.4 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-10-24 07:59 UTC] farell (Laurent Laville)
Description: ------------ While I try to read the content of an archive with PHP_Archive_Manager created by PHP_Archive_Creator, I get a NOTICE error. This is due because meta-data is missing. Example of file read by the manager (see test script) : File phar://______.phar/public/styles/site.css size: 2878 File phar://______.phar/public/styles/site.css save date: 2007-10-23 18:50 File phar://______.phar/public/styles/site.css crc: 1801274466 File phar://______.phar/public/styles/site.css size in archive: 2878 File phar://______.phar/public/styles/site.css offset in archive: 527321 File phar://______.phar/public/styles/site.css meta-data length: 0 File phar://______.phar/public/styles/site.css meta-data: NULL File phar://______.phar/public/styles/site.css GZ compressed: no File phar://______.phar/public/styles/site.css BZ2 compressed: no Test script: --------------- <?php require_once 'PHP/Archive/Manager.php'; if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { die('YOU MUST SPECIFY $sourceDir and $pharDir'); } else { $sourceDir = '(....)'; $pharDir = '(....)'; } $pharFile = $pharAlias = '______.phar'; $pam = new PHP_Archive_Manager($pharDir . DIRECTORY_SEPARATOR . $pharFile); $pam->dump(); ?> Expected result: ---------------- No NOTICE error when error_reporting level set to E_ALL Actual result: -------------- Notice: Undefined offset: 6 in /usr/local/lib/php/PHP/Archive/Manager.php on line 420

Comments