cvs: php4 /pear/PEAR/Command Common.php

From: Date: Thu, 06 Jun 2002 06:40:05 +0000
Subject: cvs: php4 /pear/PEAR/Command Common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4432@lists.php.net to get a copy of this message
cox Thu Jun 6 02:40:05 2002 EDT Modified files: /php4/pear/PEAR/Command Common.php Log: That will really avoid PHP warnings Index: php4/pear/PEAR/Command/Common.php diff -u php4/pear/PEAR/Command/Common.php:1.14 php4/pear/PEAR/Command/Common.php:1.15 --- php4/pear/PEAR/Command/Common.php:1.14 Sun Jun 2 09:07:18 2002 +++ php4/pear/PEAR/Command/Common.php Thu Jun 6 02:40:05 2002 @@ -16,7 +16,7 @@ // | Author: Stig Sæther Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.14 2002/06/02 13:07:18 ssb Exp $ +// $Id: Common.php,v 1.15 2002/06/06 06:40:05 cox Exp $ require_once "PEAR.php"; @@ -174,10 +174,10 @@ foreach ($this->commands[$command]['options'] as $k => $v) { if (isset($v['shortopt'])) { $s = $v['shortopt']; - if (@$s{1} == ':') { + if (strlen($s) > 1 && $s{1} == ':') { $argname = ''; $optional = false; - if (@$s{2} == ':') { + if (strlen($s) > 2 && $s{2} == ':') { $optional = true; $argname = substr($s, 3); } else {

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