]> granicus.if.org Git - php/commitdiff
Don't bail if there is another extension that exports constants starting with mysql...
authorUlf Wendel <uw@php.net>
Fri, 18 Jun 2010 09:56:18 +0000 (09:56 +0000)
committerUlf Wendel <uw@php.net>
Fri, 18 Jun 2010 09:56:18 +0000 (09:56 +0000)
ext/mysql/tests/mysql_constants.phpt

index e88e6556f887d24f6d228251401bba78c9b23a18..13461002095533f7dbf4147ada1ba645f0f11f44 100644 (file)
@@ -38,7 +38,7 @@ $unexpected_constants = array();
 
 foreach ($constants as $group => $consts) {
        foreach ($consts as $name => $value) {
-               if (stristr($name, 'mysql') && !stristr($name, 'mysqli')) {
+               if (stristr($name, 'mysql') && !preg_match("/^mysql([^_]+)_/iu", $name)) {
                        $name = strtoupper($name);
                        if (isset($expected_constants[$name])) {
                                unset($expected_constants[$name]);