Skip to content

Commit 3c44697

Browse files
committed
Fixed an issue in the Database_Statement::debugQuery() method
1 parent 5b2902b commit 3c44697

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

assets/css/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>Blank page</title>
5-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
66
</head>
77
<body>
88
</body>

assets/images/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>Blank page</title>
5-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
66
</head>
77
<body>
88
</body>

assets/js/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>Blank page</title>
5-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
66
</head>
77
<body>
88
</body>

share/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>Blank page</title>
5-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
66
</head>
77
<body>
88
</body>

system/library/Contao/Database/Statement.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -398,22 +398,22 @@ protected function debugQuery($objResult=null)
398398

399399
$arrData[] = $this->strQuery;
400400

401-
if ($objResult !== null || strncmp(strtoupper($this->strQuery), 'SELECT', 6) !== 0)
401+
if ($objResult === null || strncmp(strtoupper($this->strQuery), 'SELECT', 6) !== 0)
402402
{
403403
$arrData[] = sprintf('%d rows affected', $this->affectedRows);
404404
$GLOBALS['TL_DEBUG']['db'][] = $arrData;
405-
406-
return;
407405
}
406+
else
407+
{
408+
$arrData[] = sprintf('%s rows returned', $objResult->numRows);
408409

409-
$arrData[] = sprintf('%s rows returned', $objResult->numRows);
410+
if (($arrExplain = $this->explain()) != false)
411+
{
412+
$arrData[] = $arrExplain;
413+
}
410414

411-
if (($arrExplain = $this->explain()) != false)
412-
{
413-
$arrData[] = $arrExplain;
415+
$GLOBALS['TL_DEBUG']['db'][] = $arrData;
414416
}
415-
416-
$GLOBALS['TL_DEBUG']['db'][] = $arrData;
417417
}
418418

419419

0 commit comments

Comments
 (0)