Skip to content

Commit 330453b

Browse files
authored
Merge pull request Varying-Vagrant-Vagrants#1357 from Varying-Vagrant-Vagrants/tomjn-patch-1
Fixes Varying-Vagrant-Vagrants#1347
2 parents ee12631 + e30b2e3 commit 330453b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

www/default/index.php

+10-9
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,22 @@ function endsWith( $haystack, $needle ) {
8181
<p><?php echo $description; ?></p>
8282
<p><strong>URL:</strong> <?php
8383
$has_dev = false;
84-
foreach( $site['hosts'] as $host ) {
85-
86-
?>
87-
<a href="<?php echo 'http://'.$host; ?>" target="_blank"><?php echo 'http://'.$host; ?></a>,
88-
<?php
89-
if ( $has_dev ){
90-
continue;
84+
if ( !empty( $site['hosts'] ) {
85+
foreach( $site['hosts'] as $host ) {
86+
?>
87+
<a href="<?php echo 'http://'.$host; ?>" target="_blank"><?php echo 'http://'.$host; ?></a>,
88+
<?php
89+
if ( $has_dev ){
90+
continue;
91+
}
92+
$has_dev = endsWith( $host, '.dev' );
9193
}
92-
$has_dev = endsWith( $host, '.dev' );
9394
}
9495
?><br/>
9596
<strong>Folder:</strong> <code>www/<?php echo $name;?></code></p>
9697
<?php if ( $has_dev ) {
9798
?>
98-
<p class="warning"><strong>Warning:</strong> the .dev TLD is owned by Google, you should migrate to .test</p>
99+
<p class="warning"><strong>Warning:</strong> the <code>.dev</code> TLD is owned by Google, you should migrate to <code>.test</code></p>
99100
<?php
100101
}
101102
?>

0 commit comments

Comments
 (0)