未定义的属性:stdClass :: $ distance

时间:2018-01-24 22:48:48

标签: php laravel

我在其他主机上使用此脚本,但当我在GoDaddy专用主机上传时,它会显示以下错误:

Undefined property: stdClass::$distance (View: /var/www/vhosts/s132-148-149-25.secureserver.net/httpdocs/resources/views/user/ride/confirm_ride.blade.php)

请帮助。

这是完整的错误:

ErrorException in f36f8c43e70d5ae39022800216c98315467940dc.php line 46:
Undefined property: stdClass::$distance
in f36f8c43e70d5ae39022800216c98315467940dc.php line 46
at HandleExceptions->handleError('8', 'Undefined property: stdClass::$distance', '/var/www/vhosts/8476991100.com/httpdocs/storage/framework/views/f36f8c43e70d5ae39022800216c98315467940dc.php', '46', array('__path' => '/var/www/vhosts/8476991100.com/httpdocs/storage/framework/views/f36f8c43e70d5ae39022800216c98315467940dc.php', '__data' => array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'request' => object(Request), 'fare' => object(stdClass), 'service' => object(ServiceType), 'cards' => object(Collection)), 'obLevel' => '1', '__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'request' => object(Request), 'fare' => object(stdClass), 'service' => object(ServiceType), 'cards' => object(Collection))) in f36f8c43e70d5ae39022800216c98315467940dc.php line 46
at include('/var/www/vhosts/8476991100.com/httpdocs/storage/framework/views/f36f8c43e70d5ae39022800216c98315467940dc.php') in PhpEngine.php line 42
at PhpEngine->evaluatePath('/var/www/vhosts/8476991100.com/httpdocs/storage/framework/views/f36f8c43e70d5ae39022800216c98315467940dc.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'request' => object(Request), 'fare' => object(stdClass), 'service' => object(ServiceType), 'cards' => object(Collection))) in CompilerEngine.php line 59
at CompilerEngine->get('/var/www/vhosts/8476991100.com/httpdocs/resources/views/user/ride/confirm_ride.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'request' => object(Request), 'fare' => object(stdClass), 'service' => object(ServiceType), 'cards' => object(Collection))) in View.php line 149
at View->getContents() in View.php line 120
at View->renderContents() in View.php line 85
at View->render() in Response.php line 45
at Response->setContent(object(View)) in Response.php line 201
at Response->__construct(object(View)) in Router.php line 1028
at Router->prepareResponse(object(Request), object(View)) in Router.php line 653
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 43
at Authenticate->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 655
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629
at Router->dispatchToRoute(object(Request)) in Router.php line 607
at Router->dispatch(object(Request)) in Kernel.php line 268
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Debugbar.php line 51
at Debugbar->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 150
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
at Kernel->handle(object(Request)) in index.php line 53

1 个答案:

答案 0 :(得分:1)

这不是错误,只需通知您一些空变量或对象,将此行添加到脚本顶部

ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(0);