diff --git a/common/php/article.php b/common/php/article.php index cf7ca4c..b2f3fdd 100644 --- a/common/php/article.php +++ b/common/php/article.php @@ -22,20 +22,20 @@ echo "\n\n"; echo("\n"); - if (file_exists('author')){ - $author_name_raw = fopen('author', 'r'); - $author_name = fread($author_name_raw, filesize('author')); - $author_name = str_replace("\n", "", $author_name); - $byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md'; - if (file_exists($byline_path)){ - echo "
\n"; - } else { - echo "$byline_path
"; - } - fclose($author_name_raw); + if (file_exists('author') && (filesize('author') != 0)){ + $author_name_raw = fopen('author', 'r'); + $author_name = fread($author_name_raw, filesize('author')); + $author_name = str_replace("\n", "", $author_name); + $byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md'; + if (file_exists($byline_path)){ + echo " \n"; + } else { + echo "$byline_path
"; + } + fclose($author_name_raw); } if ($tag_data != NULL){ $page_tags = str_getcsv($tag_data);