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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 - 39 = ?

 
 [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