cvs: pear-core /PEAR/PackageFile/v2 Validator.php

From: Date: Sun, 20 Feb 2005 20:27:43 +0000
Subject: cvs: pear-core /PEAR/PackageFile/v2 Validator.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-29556@lists.php.net to get a copy of this message
cellog Sun Feb 20 15:27:43 2005 EDT Modified files: /pear-core/PEAR/PackageFile/v2 Validator.php Log: remove warnings on invalid <dir> tags http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.52&r2=1.53&ty=u Index: pear-core/PEAR/PackageFile/v2/Validator.php diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.52 pear-core/PEAR/PackageFile/v2/Validator.php:1.53 --- pear-core/PEAR/PackageFile/v2/Validator.php:1.52 Tue Feb 15 01:00:38 2005 +++ pear-core/PEAR/PackageFile/v2/Validator.php Sun Feb 20 15:27:42 2005 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Validator.php,v 1.52 2005/02/15 06:00:38 cellog Exp $ +// $Id: Validator.php,v 1.53 2005/02/20 20:27:42 cellog Exp $ /** * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller @@ -997,14 +997,18 @@ $list['dir'] = array($list['dir']); } foreach ($list['dir'] as $dir) { - if ($dir['attribs']['name'] == '/' || - !isset($this->_packageInfo['contents']['dir']['dir'])) { - // always use nothing if the filelist has already been flattened - $newdirs = ''; - } elseif ($dirs == '') { - $newdirs = $dir['attribs']['name']; + if (isset($dir['attribs']) && isset($dir['attribs']['name'])) { + if ($dir['attribs']['name'] == '/' || + !isset($this->_packageInfo['contents']['dir']['dir'])) { + // always use nothing if the filelist has already been flattened + $newdirs = ''; + } elseif ($dirs == '') { + $newdirs = $dir['attribs']['name']; + } else { + $newdirs = $dirs . '/' . $dir['attribs']['name']; + } } else { - $newdirs = $dirs . '/' . $dir['attribs']['name']; + $newdirs = $dirs; } $this->_validateFilelist($dir, $allowignore, $newdirs); }

« previous php.pear.cvs (#29556) next »