Skip to content

Commit

Permalink
working around differing xdebug var_dump behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnazg committed Nov 26, 2023
1 parent bf77c4b commit 6656b24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions tests/bugs/bug16617.phpt
Expand Up @@ -8,11 +8,12 @@ include 'DB/mssql.php';
$dbh = new DB_mssql();

$str = "C:\\\r\nX";
var_dump($str, $dbh->escapeSimple($str));
echo print_r($str, true), "\n";
echo print_r($dbh->escapeSimple($str), true), "\n";
?>
--EXPECT--
string(6) "C:\
X"
string(9) "C:\\
C:\
X
C:\\

X"
X
7 changes: 6 additions & 1 deletion tests/fetchmodes.inc
Expand Up @@ -60,7 +60,12 @@ for ($i = 1; $i <= 5; $i++) {
if (is_array($row)) {
print implode(', ', $row) . "\n";
} else {
var_dump($row);
// work around differing xdebug var_dump behavior
if (!empty($row)) {
print_r($row);
} else {
echo "NULL\n";
}
}
}
$sth->free(); // keep fbsql happy.
Expand Down

0 comments on commit 6656b24

Please sign in to comment.