Don't die if file tags.lst doesn't exist.
die() cuts the document at the position of the error. We just return an empty datalist.
This commit is contained in:
parent
55ea37eb9b
commit
353a16847f
|
@ -292,7 +292,8 @@
|
|||
|
||||
<datalist id="list_tags">
|
||||
<?php
|
||||
$file = fopen("tags.lst", "r") or die("Unable to open autocompletion file.");
|
||||
if ($file = fopen("tags.lst", "r"))
|
||||
{
|
||||
while(!feof($file))
|
||||
{
|
||||
$tag = rtrim(fgets($file));
|
||||
|
@ -302,6 +303,7 @@
|
|||
}
|
||||
}
|
||||
fclose($file);
|
||||
}
|
||||
?>
|
||||
</datalist>
|
||||
</body>
|
||||
|
|
Reference in New Issue