zz 6 years ago
parent
commit
b2fed8053c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/Wap/Book/ChapterController.php

+ 3 - 1
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -557,7 +557,9 @@ class ChapterController extends BaseController
         if ((int)$this->_user_info['balance'] >= $fee) {
             if ($this->bookOrderOrChapterOrder($book_info, $chapter->id, $fee, $chapter->name, $is_remind)) {
                 $this->chapterOrderStats($fee);
-                $this->user->balance -= $fee;
+                if($this->user){
+                    $this->user->balance -= $fee;
+                }
                 return true;
             }
         }