cvs: pear /PHP_CompatInfo CompatInfo.php

From: Date: Mon, 12 May 2008 14:15:07 +0000
Subject: cvs: pear /PHP_CompatInfo CompatInfo.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-52300@lists.php.net to get a copy of this message
farell Mon May 12 14:15:07 2008 UTC Modified files: /pear/PHP_CompatInfo CompatInfo.php Log: complete bug fix 13873 - for extension_loaded() and defined() usages http://cvs.php.net/viewvc.cgi/pear/PHP_CompatInfo/CompatInfo.php?r1=1.94&r2=1.95&diff_format=u Index: pear/PHP_CompatInfo/CompatInfo.php diff -u pear/PHP_CompatInfo/CompatInfo.php:1.94 pear/PHP_CompatInfo/CompatInfo.php:1.95 --- pear/PHP_CompatInfo/CompatInfo.php:1.94 Mon May 12 14:12:04 2008 +++ pear/PHP_CompatInfo/CompatInfo.php Mon May 12 14:15:07 2008 @@ -15,7 +15,7 @@ * @author Davey Shafik <davey@php.net> * @author Laurent Laville <pear@laurent-laville.org> * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: CompatInfo.php,v 1.94 2008/05/12 14:12:04 farell Exp $ + * @version CVS: $Id: CompatInfo.php,v 1.95 2008/05/12 14:15:07 farell Exp $ * @link http://pear.php.net/package/PHP_CompatInfo * @since File available since Release 0.7.0 */ @@ -897,28 +897,30 @@ && (strcasecmp($tokens[$i][1], 'extension_loaded') == 0)) { $j = $i; - while ((!$this->_isToken($tokens[$j], - 'T_CONSTANT_ENCAPSED_STRING'))) { + while ((!$this->_isToken($tokens[$j], ')'))) { + if ($this->_isToken($tokens[$j], 'T_CONSTANT_ENCAPSED_STRING')) { + $t_string = $tokens[$j][1]; + $t_string = trim($t_string, "'"); + $t_string = trim($t_string, '"'); + $extension_loaded[] = $t_string; + } $j++; } - $t_string = $tokens[$j][1]; - $t_string = trim($t_string, "'"); - $t_string = trim($t_string, '"'); - $extension_loaded[] = $t_string; } // try to detect condition defined() if ($this->_isToken($tokens[$i], 'T_STRING') && (strcasecmp($tokens[$i][1], 'defined') == 0)) { $j = $i; - while ((!$this->_isToken($tokens[$j], - 'T_CONSTANT_ENCAPSED_STRING'))) { + while ((!$this->_isToken($tokens[$j], ')'))) { + if ($this->_isToken($tokens[$j], 'T_CONSTANT_ENCAPSED_STRING')) { + $t_string = $tokens[$j][1]; + $t_string = trim($t_string, "'"); + $t_string = trim($t_string, '"'); + $defined[] = $t_string; + } $j++; } - $t_string = $tokens[$j][1]; - $t_string = trim($t_string, "'"); - $t_string = trim($t_string, '"'); - $defined[] = $t_string; } // try to detect beginning of a class

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