Whoops, looks like something went wrong.

1/1 ErrorException in MainController.php line 786: Invalid argument supplied for foreach()

  1. in MainController.php line 786
  2. at HandleExceptions->handleError(2, 'Invalid argument supplied for foreach()', '/data/web/dahailaozhen.cn/app/Http/Controllers/Book/MainController.php', 786, array('ids' => array(845948), 'es' => object(Client), 'filename' => 'ZHENBENKEJI_document_list20181016.txt', 'v' => 845948, 'k' => 0, 'book' => object(Book), 'result' => array('_index' => 'book_v4', '_type' => 'data', '_id' => '845948', '_version' => 2, 'found' => true, '_source' => array('id' => 845948, 'name' => '史拾众断:5卷', 'name_simplify' => '史拾众断:5卷', 'page' => '', 'paper_size' => '', 'type_id' => 1017, 'review_id' => 0, 'area_id' => 1152, 'language_id' => 235, 'language_name' => '中文繁体', 'status' => 1, 'valid_status' => 1, 'is_public' => 0, 'is_full' => 0, 'collection_id' => 8, 'spider_id' => 0, 'spider_code' => '', 'add_time' => 1533888229, 'modify_time' => 1533888229, 'isbn' => '', 'year' => 1621, 'month' => 0, 'day' => 0, 'end_year' => 1646, 'end_month' => 0, 'end_day' => 0, 'date_name' => '', 'edition' => '明末[1621-1646]', 'category' => array(array('id' => 884, 'name' => '史'), array('id' => 884006, 'name' => '杂史')), 'picture' => array(), 'region' => array(), 'period' => array(), 'author' => array(array('name' => '吴弘基', 'id' => 287321, 'role_id' => 2604, 'thumb' => '', 'role_name' => '编笺')), 'publisher' => array(), 'journal' => array(), 'series' => array(), 'tag' => array(), 'source' => array(array('name' => '哈佛燕京图书馆', 'id' => 960, 'is_show' => 1, 'source_link' => 'https://iiif.lib.harvard.edu/manifests/view/drs:23967568$807i')), 'area_name' => '美国', 'collection_name' => '哈佛燕京图书馆')), 'info' => array('id' => 'N5EYBGwwnpXGjRLW', 'name' => '史拾眾斷:5卷', 'name_simplify' => '史拾眾斷:5卷', 'page' => '', 'paper_size' => '', 'type_id' => 1017, 'review_id' => 0, 'area_id' => 'MBK2RvKZ', 'language_id' => '3wKgoVK8', 'language_name' => '中文', 'status' => 1, 'valid_status' => 1, 'is_public' => 0, 'is_full' => 0, 'collection_id' => 'MBK2vKZP', 'spider_id' => 0, 'spider_code' => '', 'add_time' => 1533888229, 'modify_time' => 1533888229, 'isbn' => '', 'year' => 1621, 'month' => 0, 'day' => 0, 'end_year' => 1646, 'end_month' => 0, 'end_day' => 0, 'date_name' => '', 'edition' => '明末[1621-1646]', 'category' => array(array('id' => 'P7kjnyayYmaO0ZXJ', 'name' => '史'), array('id' => 'zJLnVG91lLJGEKxM', 'name' => '雜史')), 'picture' => array(), 'region' => array(), 'period' => array(), 'author' => array(array('name' => '吳弘基', 'id' => 'X2Y5MdOpmjxa9gVl', 'role_id' => 2604, 'thumb' => '', 'role_name' => '編箋')), 'publisher' => array(), 'journal' => array(), 'series' => array(), 'tag' => array(), 'source' => array(array('name' => '哈佛燕京圖書館', 'id' => 960, 'is_show' => 1, 'source_link' => 'https://iiif.lib.harvard.edu/manifests/view/drs:23967568$807i')), 'area_name' => '美國', 'collection_name' => '哈佛燕京圖書館', 'is_store' => 0, 'thumb' => '/img/pl/1017.jpg', 'date' => '1621 - 1646'), 'tmp' => array('1、史拾眾斷:5卷(书籍) 1621'), 'au' => array(), 'ax' => array())) in MainController.php line 786
  3. at MainController->downloadTxt(array(845948)) in MainController.php line 860
  4. at MainController->download(object(Request), 'pdf')
  5. at call_user_func_array(array(object(MainController), 'download'), array(object(Request), 'type' => 'pdf')) in Controller.php line 55
  6. at Controller->callAction('download', array(object(Request), 'type' => 'pdf')) in ControllerDispatcher.php line 44
  7. at ControllerDispatcher->dispatch(object(Route), object(MainController), 'download') in Route.php line 203
  8. at Route->runController() in Route.php line 160
  9. at Route->run() in Router.php line 559
  10. at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 30
  11. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
  12. at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 148
  13. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  14. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
  15. at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
  16. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  17. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
  18. at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
  19. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  20. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
  21. at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 148
  22. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  23. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
  24. at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 148
  25. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  26. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
  27. at Pipeline->then(object(Closure)) in Router.php line 561
  28. at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 520
  29. at Router->dispatchToRoute(object(Request)) in Router.php line 498
  30. at Router->dispatch(object(Request)) in Kernel.php line 174
  31. at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
  32. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
  33. at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
  34. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  35. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
  36. at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
  37. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  38. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ValidatePostSize.php line 27
  39. at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148
  40. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  41. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
  42. at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
  43. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
  44. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
  45. at Pipeline->then(object(Closure)) in Kernel.php line 149
  46. at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
  47. at Kernel->handle(object(Request)) in index.php line 53