diff --git a/adminer/replication.inc.php b/adminer/replication.inc.php
index bd25841d..33a13091 100644
--- a/adminer/replication.inc.php
+++ b/adminer/replication.inc.php
@@ -1,20 +1,24 @@
" . lang('Master status') . "" . doc_link(array("sql" => "show-master-status.html")) . "\n";
+echo "
" . lang('Master status') . doc_link(array("sql" => "show-master-status.html")) . "
\n";
$master_replication_status = replication_status("MASTER");
-echo "\n";
-foreach ($master_replication_status[0] as $key => $val) {
- echo "";
- echo "" . h($key);
- echo " | " . nbsp($val);
+if (!$master_replication_status) {
+ echo " " . lang('No rows.') . "\n";
+} else {
+ echo " \n";
+ foreach ($master_replication_status[0] as $key => $val) {
+ echo "";
+ echo "" . h($key);
+ echo " | " . nbsp($val);
+ }
+ echo " | \n";
}
-echo " |
\n";
$slave_replication_status = replication_status("SLAVE");
-if (!empty($slave_replication_status)) {
- echo "" . lang('Slave status') . "" . doc_link(array("sql" => "show-slave-status.html")) . "\n";
- foreach ($slave_replication_status as $slave) {
+if ($slave_replication_status) {
+ echo "
" . lang('Slave status') . doc_link(array("sql" => "show-slave-status.html")) . "
\n";
+ foreach ($slave_replication_status[0] as $slave) {
echo "\n";
foreach ($slave as $key => $val) {
echo "";