Tests shouldn't use a function removed in PHP 7

This commit is contained in:
Calvin Buckley
2020-04-20 11:45:30 -03:00
parent 4f75ad4344
commit 48930db462
5 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ if ($conn)
$i = 0;
while ($row=db2_fetch_both($result))
{
if (eregi("T1|T2|T3|T4",$row[2])) {
if (preg_match("/T1|T2|T3|T4/i",$row[2])) {
if ($i < 4) print $row[1] . "/" . $row[2] . "\n";
$i++;
}

View File

@@ -30,7 +30,7 @@ if ($conn)
$i = 0;
while ($row = db2_fetch_both($result))
{
if (eregi("T1|T2|T3|T4",$row['TABLE_NAME'])) {
if (preg_match("/T1|T2|T3|T4/i",$row['TABLE_NAME'])) {
$str = $row['TABLE_SCHEM'] . $row['TABLE_NAME'] . $row['TABLE_TYPE'];
if ($i < 4) print $str . "\n";
$i++;

View File

@@ -31,7 +31,7 @@ if ($conn)
$i = 0;
while ($row = db2_fetch_both($result))
{
if (eregi("T1|T2|T3|T4",$row[2])) {
if (preg_match("/T1|T2|T3|T4/i",$row[2])) {
$str = $row[1] ."/". $row[2] ."/". $row[3];
if ($i < 4) print $str . "\n";
$i++;

View File

@@ -35,7 +35,7 @@ print "\n\n";
$i = 0;
while ($row=db2_fetch_array($result))
{
if (eregi("T1|T2|T3|T4",$row[2])) {
if (preg_match("/T1|T2|T3|T4/i",$row[2])) {
db2_num_fields($result);
if ($i < 4) print ", " . $row[1] . ", " . $row[2] . ", " . $row[3] . ", , \n";
$i++;

View File

@@ -12,7 +12,7 @@ $conn = db2_connect($database, $user, $password);
$result = db2_tables($conn, NULL, strtoupper($user), 'ANIM%');
while ($row = db2_fetch_object($result)) {
if (eregi("ANIME_CAT|ANIMALS",$row->TABLE_NAME)) {
if (preg_match("/ANIME_CAT|ANIMALS/i",$row->TABLE_NAME)) {
echo 'Schema: ' . $row->TABLE_SCHEM . "\n";
echo 'Name: ' . $row->TABLE_NAME . "\n";
echo 'Type: ' . $row->TABLE_TYPE . "\n";