cvs: pear /PHP_CompatInfo CompatInfo.php
| From: | Laurent Laville | Date: | Mon, 12 May 2008 14:44:48 +0000 |
| Subject: | cvs: pear /PHP_CompatInfo CompatInfo.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-52301@lists.php.net to get a copy of this message | ||
farell Mon May 12 14:44:48 2008 UTC
Modified files:
/pear/PHP_CompatInfo CompatInfo.php
Log:
Removes duplicate values from conditional code array !
Example to see such duplicate values (constant) is to parse file
"forum\include\forum.inc.php"
of Beehive Forum 0.8.2 distrib
You will see multiple BEEHIVE_INSTALL_NOWARN constant entries
See also bug http://pear.php.net/bugs/bug.php?id=13873
http://cvs.php.net/viewvc.cgi/pear/PHP_CompatInfo/CompatInfo.php?r1=1.95&r2=1.96&diff_format=u
Index: pear/PHP_CompatInfo/CompatInfo.php
diff -u pear/PHP_CompatInfo/CompatInfo.php:1.95 pear/PHP_CompatInfo/CompatInfo.php:1.96
--- pear/PHP_CompatInfo/CompatInfo.php:1.95 Mon May 12 14:15:07 2008
+++ pear/PHP_CompatInfo/CompatInfo.php Mon May 12 14:44:48 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.95 2008/05/12 14:15:07 farell Exp $
+ * @version CVS: $Id: CompatInfo.php,v 1.96 2008/05/12 14:44:48 farell Exp $
* @link http://pear.php.net/package/PHP_CompatInfo
* @since File available since Release 0.7.0
*/
@@ -1143,12 +1143,15 @@
ksort($functions_version);
if (count($function_exists) > 0) {
- $cond_code += 1;
+ $function_exists = array_unique($function_exists);
+ $cond_code += 1;
}
if (count($extension_loaded) > 0) {
- $cond_code += 2;
+ $extension_loaded = array_unique($extension_loaded);
+ $cond_code += 2;
}
if (count($defined) > 0) {
+ $defined = array_unique($defined);
$cond_code += 4;
}
$cond_code = array($cond_code,