Whoops, looks like something went wrong.

(1/1) ErrorException

Invalid argument supplied for foreach()

in MainController.php line 786
at HandleExceptions->handleError(2, 'Invalid argument supplied for foreach()', '/data/web/dahailaozhen.cn/app/Http/Controllers/Book/MainController.php', 786, array('ids' => array(959760), 'es' => object(Client), 'filename' => 'ZHENBENKEJI_document_list20181115.txt', 'v' => 959760, 'k' => 0, 'book' => object(Book), 'result' => array('_index' => 'book_v4', '_type' => 'data', '_id' => '959760', '_version' => 1, 'found' => true, '_source' => array('id' => 959760, 'name' => '[康熙]保安州志', 'name_simplify' => '[康熙]保安州志', 'page' => '', 'paper_size' => '', 'type_id' => 1017, 'review_id' => 0, 'area_id' => 1002, 'language_id' => 235, 'language_name' => '中文繁体', 'status' => 1, 'valid_status' => 1, 'is_public' => 0, 'is_full' => 1, 'collection_id' => 7, 'spider_id' => 11, 'spider_code' => 'acd94afd50026bcb5c9cd7f8bdda70bf', 'add_time' => 1541670333, 'modify_time' => 1541670333, 'summary' => '版本书目史注:10行20字,小字双行同,白口,四周双边。', 'isbn' => '', 'year' => 1662, 'month' => 0, 'day' => 0, 'end_year' => 1722, 'end_month' => 0, 'end_day' => 0, 'date_name' => '', 'edition' => '清康熙[1662-1722] 刻本', 'category' => array(array('id' => 884, 'name' => '史'), array('id' => 884001, 'name' => '地理'), array('id' => 884001001, 'name' => '方志')), 'picture' => array(), 'region' => array(), 'period' => array(), 'author' => array(array('name' => '(清)宁完福', 'id' => 340831, 'role_id' => 1189, 'thumb' => '', 'role_name' => '修'), array('name' => '(清)朱光', 'id' => 340832, 'role_id' => 1026, 'thumb' => '', 'role_name' => '纂')), 'publisher' => array(), 'journal' => array(), 'series' => array(), 'tag' => array(), 'source' => array(array('name' => '中国国家图书馆', 'id' => 896, 'is_show' => 1, 'source_link' => 'http://mylib.nlc.cn:80/web/guest/search/shanbenjiaojuan/medaDataDisplay?metaData.id=6475372&metaData.lId=3712733&IdLib=402834c3409540be0141aa7d72035310')), 'area_name' => '中国', 'collection_name' => '国图')), 'info' => array('id' => 'rz3N76ZxxOOdYJBe', 'name' => '[康熙]保安州志', 'name_simplify' => '[康熙]保安州志', 'page' => '', 'paper_size' => '', 'type_id' => 1017, 'review_id' => 0, 'area_id' => 'Bxk9gEXj', 'language_id' => '3wKgoVK8', 'language_name' => '中文', 'status' => 1, 'valid_status' => 1, 'is_public' => 0, 'is_full' => 1, 'collection_id' => 'z2WMdkg1', 'spider_id' => 11, 'spider_code' => 'acd94afd50026bcb5c9cd7f8bdda70bf', 'add_time' => 1541670333, 'modify_time' => 1541670333, 'summary' => '版本書目史註:10行20字,小字雙行同,白口,四周雙邊。', 'isbn' => '', 'year' => 1662, 'month' => 0, 'day' => 0, 'end_year' => 1722, 'end_month' => 0, 'end_day' => 0, 'date_name' => '', 'edition' => '清康熙[1662-1722] 刻本', 'category' => array(array('id' => 'P7kjnyayYmaO0ZXJ', 'name' => '史'), array('id' => '9kZnEdKzmQ2G8VqO', 'name' => '地理'), array('id' => 'kZnEdKqKAeRA68Vq', 'name' => '方誌')), 'picture' => array(), 'region' => array(), 'period' => array(), 'author' => array(array('name' => '(清)寧完福', 'id' => 'AMjPYdmjm19abQ3g', 'role_id' => 1189, 'thumb' => '', 'role_name' => '修'), array('name' => '(清)朱光', 'id' => 'ALYzrdL0qxAdODXQ', 'role_id' => 1026, 'thumb' => '', 'role_name' => '纂')), 'publisher' => array(), 'journal' => array(), 'series' => array(), 'tag' => array(), 'source' => array(array('name' => '中國國家圖書館', 'id' => 896, 'is_show' => 1, 'source_link' => 'http://mylib.nlc.cn:80/web/guest/search/shanbenjiaojuan/medaDataDisplay?metaData.id=6475372&metaData.lId=3712733&IdLib=402834c3409540be0141aa7d72035310')), 'area_name' => '中國', 'collection_name' => '國圖', 'is_store' => 0, 'thumb' => '/img/pl/1017.jpg', 'date' => '1662 - 1722'), 'tmp' => array('1、[康熙]保安州志(书籍) 1662'), 'au' => array(), 'ax' => array()))in MainController.php line 786
at MainController->downloadTxt(array(959760))in MainController.php line 860
at MainController->download(object(Request), 'pdf')
at call_user_func_array(array(object(MainController), 'download'), array(object(Request), 'type' => 'pdf'))in Controller.php line 54
at Controller->callAction('download', array(object(Request), 'type' => 'pdf'))in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(MainController), 'download')in Route.php line 212
at Route->runController()in Route.php line 169
at Route->run()in Router.php line 679
at Router->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request))in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in StartSession.php line 63
at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 104
at Pipeline->then(object(Closure))in Router.php line 681
at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 656
at Router->runRoute(object(Request), object(Route))in Router.php line 622
at Router->dispatchToRoute(object(Request))in Router.php line 611
at Router->dispatch(object(Request))in Kernel.php line 176
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request))in TransformsRequest.php line 31
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in TransformsRequest.php line 31
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in CheckForMaintenanceMode.php line 62
at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 104
at Pipeline->then(object(Closure))in Kernel.php line 151
at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 116
at Kernel->handle(object(Request))in index.php line 53