From 9a8397d78f13fff1325f0c5aad4412d46071a69e Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Mon, 27 Jan 2014 12:11:32 +0700 Subject: [PATCH] Fix edit bio for new user Fix edit bio for new user due to the author.md doesnt exist. --- admin/action/edit_bio.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/admin/action/edit_bio.php b/admin/action/edit_bio.php index 688442f..89d5ae1 100644 --- a/admin/action/edit_bio.php +++ b/admin/action/edit_bio.php @@ -14,15 +14,21 @@ $filename = '../../content/' . $user . '/author.md'; + if(file_exists($filename)) { $content = file_get_contents($filename); - $arr = explode('t-->', $content); - if(isset($arr[1])) { - $oldtitle = ltrim(rtrim(str_replace('', $content); + if(isset($arr[1])) { + $oldtitle = ltrim(rtrim(str_replace('