rabin 3 years ago
parent
commit
f774cb04db
1 changed files with 8 additions and 5 deletions
  1. 8 5
      tool/work/lib/Manage.php

+ 8 - 5
tool/work/lib/Manage.php

@@ -61,12 +61,15 @@ Class Manage
 			$where['chdate'] = time();
 			Dever::db('work/info')->update($where);
 			$log = Dever::db('work/info_log')->find(array('info_id'=>$id));
-			$w['where_id'] = $log['id'];
-			$w['fdate'] = time();
-			if($type == 1){
-				$w['cloce_date'] = time();
+			if ($log) {
+				$w['where_id'] = $log['id'];
+				$w['fdate'] = time();
+				if($type == 1){
+					$w['cloce_date'] = time();
+				}
+				Dever::db('work/info_log')->update($w);
 			}
-			Dever::db('work/info_log')->update($w);
+			
 			return 'ok';
 		}
 	}