Re: cvs: pear-core /PEAR Validate.php

From: Date: Sun, 27 Feb 2005 23:35:13 +0000
Subject: Re: cvs: pear-core /PEAR Validate.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36410@lists.php.net to get a copy of this message
On Sun, 27 Feb 2005 21:39:48 -0000, Greg Beaver <cellog@php.net> wrote: > cellog Sun Feb 27 16:39:48 2005 EDT > > Modified files: > /pear-core/PEAR Validate.php > Log: > make version validation less strict - only warn on versions > that are not x.y.z Wait a minute, what? Versions *must* have 3 decimals. That's part of the standard. > > > http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.34&r2=1.35&ty=u > Index: pear-core/PEAR/Validate.php > diff -u pear-core/PEAR/Validate.php:1.34 pear-core/PEAR/Validate.php:1.35 > --- pear-core/PEAR/Validate.php:1.34 Wed Feb 23 13:52:39 2005 > +++ pear-core/PEAR/Validate.php Sun Feb 27 16:39:47 2005 > @@ -16,7 +16,7 @@ > // | Authors: Gregory Beaver <cellog@php.net> | > // +----------------------------------------------------------------------+ > // > -// $Id: Validate.php,v 1.34 2005/02/23 18:52:39 cellog Exp $ > +// $Id: Validate.php,v 1.35 2005/02/27 21:39:47 cellog Exp $ > define('PEAR_VALIDATE_INSTALLING', 1); > define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others > define('PEAR_VALIDATE_NORMAL', 3); > @@ -233,14 +233,14 @@ > $this->_addFailure('version', > 'Invalid version number "' . > $this->_packagexml->getVersion() . '"'); > } > - return; > + return false; > } > $version = $this->_packagexml->getVersion(); > $versioncomponents = explode('.', $version); > if (count($versioncomponents) != 3) { > - $this->_addFailure('version', > - 'A version number must have 3 decimals (x.y.z)'); > - return false; > + $this->_addWarning('version', > + 'A version number should have 3 decimals (x.y.z)'); > + return true; > } > $name = $this->_packagexml->getPackage(); > // version must be based upon state > -- Justin Patrin

« previous php.pear.dev (#36410) next »