diff --git a/pmcalendar.php b/pmcalendar.php index 3f8fd0c..826da47 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -205,8 +205,9 @@ if ($act == 'newevent') { $del = r('del'); $content = stripslashes(r('content')); $dict = array(); - $event = DB::getone("select yanqi_history from calendar where id={$id}"); + $event = DB::getone("select yanqi_history from calendar where id='{$id}'"); $yanqi_history = $event['yanqi_history']; + $yanqi_history=json_decode($yanqi_history,true); if(!$del) { $yanqi_history[$idx]['reason'] = $content; }