亚搏app平台

ErrorException

HTTP 500 Internal Server Error

Trying to access array offset on value of type null

Exception

ErrorException

  1. #var_dump($article_json_2024);
  2. $content = $article_json [ 'content' ];
  3. $title = $article_json [ 'title' ];
  4. $content_news = $article_json_news [ 'content' ];
  5. $title_news = $article_json_news [ 'title' ];
  6. $title_2024 = $article_json_2024 [ 'title' ];
  7. $content_xz = $article_json_xz [ 'content' ];
  8. $title_xz = $article_json_xz [ 'title' ];
  9. $redis = Redis :: connection ()-> client ();
  10. $get_path_domain = get_path_settings ();
  1. protected function registerErrorHandling ()
  2.     {
  3. error_reporting (- 1 );
  4. set_error_handler (function ( $level , $message , $file = '' , $line = 0 ) {
  5. $this -> handleError ( $level , $message , $file , $line );
  6.         });
  7. set_exception_handler (function ( $e ) {
  8. $this -> handleException ( $e );
  9.         });
Application -> Laravel\Lumen\Concerns\{closure} () in /www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php (line 41)
  1. #var_dump($article_json_2024);
  2. $content = $article_json [ 'content' ];
  3. $title = $article_json [ 'title' ];
  4. $content_news = $article_json_news [ 'content' ];
  5. $title_news = $article_json_news [ 'title' ];
  6. $title_2024 = $article_json_2024 [ 'title' ];
  7. $content_xz = $article_json_xz [ 'content' ];
  8. $title_xz = $article_json_xz [ 'title' ];
  9. $redis = Redis :: connection ()-> client ();
  10. $get_path_domain = get_path_settings ();
PathShowController :: calc_view_data () in /www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php (line 84)
  1.     public function index ( Request $request ){
  2. $get_path_domain = get_path_settings ();
  3. # 缓存系统
  4. if( $get_path_domain [ 'cache' ] == 1 ){
  5. $cache_view = Cache :: get ( $request -> fullUrl (). check_spider (), function () use ( $request ){
  6. $calc_view_data = self :: calc_view_data ();
  7. Cache :: put ( $request -> fullUrl (). check_spider (), '' . $calc_view_data );
  8.                 return $calc_view_data ;
  9.             });
  10.         }else{
  11. $cache_view = self :: calc_view_data ();
in /www/wwwroot/amcrjt.com/vendor/illuminate/collections/helpers.php -> App\Http\Controllers\{closure} (line 184)
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4. function value ( $value , ... $args )
  5.     {
  6.         return $value instanceof Closure ? $value (... $args ) : $value ;
  7.     }
  8. }
  1.         // the default value for this cache value. This default could be a callback
  2.         // so we will execute the value function which will resolve it if needed.
  3. if ( is_null ( $value )) {
  4. $this -> event (new CacheMissed ( $key ));
  5. $value = value ( $default );
  6.         } else {
  7. $this -> event (new CacheHit ( $key , $value ));
  8.         }
  9.         return $value ;
  1.      * @param  array  $parameters
  2.      * @return mixed
  3.      */
  4. public function __call ( $method , $parameters )
  5.     {
  6.         return $this -> store ()-> $method (... $parameters );
  7.     }
  8. }
  1.         if (! $instance ) {
  2.             throw new RuntimeException ( 'A facade root has not been set.' );
  3.         }
  4.         return $instance -> $method (... $args );
  5.     }
  6. }
  1. if( $get_path_domain [ 'cache' ] == 1 ){
  2. $cache_view = Cache :: get ( $request -> fullUrl (). check_spider (), function () use ( $request ){
  3. $calc_view_data = self :: calc_view_data ();
  4. Cache :: put ( $request -> fullUrl (). check_spider (), '' . $calc_view_data );
  5.                 return $calc_view_data ;
  6.             });
  7.         }else{
  8. $cache_view = self :: calc_view_data ();
  9.         }
  10.         return response ( $cache_view );
  1.         if (static:: isCallableWithAtSign ( $callback ) || $defaultMethod ) {
  2.             return static:: callClass ( $container , $callback , $parameters , $defaultMethod );
  3.         }
  4.         return static:: callBoundMethod ( $container , $callback , function () use ( $container , $callback , $parameters ) {
  5.             return $callback (... array_values (static:: getMethodDependencies ( $container , $callback , $parameters )));
  6.         });
  7.     }
  8. public static function unwrapIfClosure ( $value )
  9.     {
  10.         return $value instanceof Closure ? $value () : $value ;
  11.     }
  12. public function call ( $callback , array $parameters = [], $defaultMethod = null )
  13.     {
  14.         return BoundMethod :: call ( $this , $callback , $parameters , $defaultMethod );
  15.     }
  16. protected function callControllerCallable (callable $callable , array $parameters = [])
  17.     {
  18.         try {
  19.             return $this -> prepareResponse (
  20. $this -> call ( $callable , $parameters )
  21.             );
  22.         } catch ( HttpResponseException $e ) {
  23.             return $e -> getResponse ();
  24.         }
  25.     }
  1.             return $this -> callLumenControllerWithMiddleware (
  2. $instance , $method , $routeInfo , $middleware
  3. );
  4.         } else {
  5.             return $this -> callControllerCallable (
  6.                 [ $instance , $method ], $routeInfo [ 2 ]
  7.             );
  8.         }
  9.     }
  10. protected function prepareDestination ( BaseClosure $destination )
  11.     {
  12.         return function ( $passable ) use ( $destination ) {
  13.             try {
  14.                 return $destination ( $passable );
  15.             } catch ( Throwable $e ) {
  16.                 return $this -> handleException ( $passable , $e );
  17.             }
  18.         };
  19.     }
Pipeline -> Laravel\Lumen\Routing\{closure} () in /www/wwwroot/amcrjt.com/app/Http/Middleware/RegisterMiddleware.php (line 67)
  1. //            return response(view('path.register.'.$page_register));
  2. //        }
  3. if( $spider_type == 'tourist' ){
  4.             return self :: page404 ();
  5.         }
  6.         return $next ( $request );
  7.     }
  8.     private function page404 (){
  9.         if ( Str :: of ( $this -> path_setting [ 'page404' ])-> endsWith ( '.blade.php' )){
  10. $file = Str :: of ( $this -> path_setting [ 'page404' ])-> rtrim ( '.blade.php' );
  1.                         // since the object we're given was already a fully instantiated object.
  2. $parameters = [ $passable , $stack ];
  3.                     }
  4. $carry = method_exists ( $pipe , $this -> method )
  5.                                     ? $pipe ->{ $this -> method }(... $parameters )
  6.                                     : $pipe (... $parameters );
  7.                     return $this -> handleCarry ( $carry );
  8.                 } catch ( Throwable $e ) {
  9.                     return $this -> handleException ( $passable , $e );
  1.         return function ( $stack , $pipe ) {
  2.             return function ( $passable ) use ( $stack , $pipe ) {
  3.                 try {
  4. $slice = parent :: carry ();
  5.                     return ( $slice ( $stack , $pipe ))( $passable );
  6.                 } catch ( Throwable $e ) {
  7.                     return $this -> handleException ( $passable , $e );
  8.                 }
  9.             };
  10.         };
Pipeline -> Laravel\Lumen\Routing\{closure} () in /www/wwwroot/amcrjt.com/app/Http/Middleware/LoggingMiddleware.php (line 48)
  1.                 }else{
  2. Log :: info ( $request_ip . "\t" . $path_domains [ 'proxy_domain' ]. $url . "\t" . $agent );
  3.                 }
  4.             }
  5.         }
  6.         return $next ( $request );
  7.     }
  8. }
  1.                         // since the object we're given was already a fully instantiated object.
  2. $parameters = [ $passable , $stack ];
  3.                     }
  4. $carry = method_exists ( $pipe , $this -> method )
  5.                                     ? $pipe ->{ $this -> method }(... $parameters )
  6.                                     : $pipe (... $parameters );
  7.                     return $this -> handleCarry ( $carry );
  8.                 } catch ( Throwable $e ) {
  9.                     return $this -> handleException ( $passable , $e );
  1.         return function ( $stack , $pipe ) {
  2.             return function ( $passable ) use ( $stack , $pipe ) {
  3.                 try {
  4. $slice = parent :: carry ();
  5.                     return ( $slice ( $stack , $pipe ))( $passable );
  6.                 } catch ( Throwable $e ) {
  7.                     return $this -> handleException ( $passable , $e );
  8.                 }
  9.             };
  10.         };
Pipeline -> Laravel\Lumen\Routing\{closure} () in /www/wwwroot/amcrjt.com/app/Http/Middleware/StaticMiddleware.php (line 49)
  1.             }else{
  2. abort ( 404 );
  3.             }
  4.         }
  5.         return $next ( $request );
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2. $parameters = [ $passable , $stack ];
  3.                     }
  4. $carry = method_exists ( $pipe , $this -> method )
  5.                                     ? $pipe ->{ $this -> method }(... $parameters )
  6.                                     : $pipe (... $parameters );
  7.                     return $this -> handleCarry ( $carry );
  8.                 } catch ( Throwable $e ) {
  9.                     return $this -> handleException ( $passable , $e );
  1.         return function ( $stack , $pipe ) {
  2.             return function ( $passable ) use ( $stack , $pipe ) {
  3.                 try {
  4. $slice = parent :: carry ();
  5.                     return ( $slice ( $stack , $pipe ))( $passable );
  6.                 } catch ( Throwable $e ) {
  7.                     return $this -> handleException ( $passable , $e );
  8.                 }
  9.             };
  10.         };
Pipeline -> Laravel\Lumen\Routing\{closure} () in /www/wwwroot/amcrjt.com/app/Http/Middleware/BlackListMiddleware.php (line 33)
  1. # 屏蔽请求头
  2. $black_agent = [ 'Bytespider' , 'dataforseo' , 'Baiduspider+(+http://www.baidu.com/search/spider.htm);google|baiduspider|baidu|spider|sogou|bing|yahoo|soso|sosospider|360spider|youdao|jikeSpider;)' , 'Googlebot' , 'bingbot' , 'MJ12bot' , 'AhrefsBot' , 'DNSPod-Monitor' , 'BLEXBot' , 'EasouSpider' , 'YandexBot' , 'TestBot/0.1' , 'SemrushBot' ,];
  3.         if( Str :: of ( $request -> server ( 'HTTP_USER_AGENT' ))-> contains ( $black_agent )){
  4.             return response ( view ( 'path.error.nginx' ), 404 );
  5.         }
  6.         return $next ( $request );
  7.     }
  8. }
  1.                         // since the object we're given was already a fully instantiated object.
  2. $parameters = [ $passable , $stack ];
  3.                     }
  4. $carry = method_exists ( $pipe , $this -> method )
  5.                                     ? $pipe ->{ $this -> method }(... $parameters )
  6.                                     : $pipe (... $parameters );
  7.                     return $this -> handleCarry ( $carry );
  8.                 } catch ( Throwable $e ) {
  9.                     return $this -> handleException ( $passable , $e );
  1.         return function ( $stack , $pipe ) {
  2.             return function ( $passable ) use ( $stack , $pipe ) {
  3.                 try {
  4. $slice = parent :: carry ();
  5.                     return ( $slice ( $stack , $pipe ))( $passable );
  6.                 } catch ( Throwable $e ) {
  7.                     return $this -> handleException ( $passable , $e );
  8.                 }
  9.             };
  10.         };
in /www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php -> Laravel\Lumen\Routing\{closure} (line 103)
  1.     {
  2. $pipeline = array_reduce (
  3. array_reverse ( $this -> pipes ()), $this -> carry (), $this -> prepareDestination ( $destination )
  4.         );
  5.         return $pipeline ( $this -> passable );
  6.     }
  7. public function run ( $request = null )
  8.     {
  9. $response = $this -> dispatch ( $request );
  10.         if ( $response instanceof SymfonyResponse ) {
  11. $response -> send ();
  12.         } else {
  13.             echo (string) $response ;
Application -> run () in /www/wwwroot/amcrjt.com/public/index.php (line 28)
  1. | the client's browser allowing them to enjoy the creative
  2. | and wonderful application we have prepared for them.
  3. |
  4. */
  5. $app -> run ();

Stack Trace

ErrorException
ErrorException: Trying to access array offset on value of type null    at /www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php:41   at Laravel\Lumen\Application->handleError()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)   at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()      (/www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php:41)   at App\Http\Controllers\PathShowController::calc_view_data()      (/www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php:84)   at App\Http\Controllers\PathShowController->App\Http\Controllers\{closure}()      (/www/wwwroot/amcrjt.com/vendor/illuminate/collections/helpers.php:184)   at value()      (/www/wwwroot/amcrjt.com/vendor/illuminate/cache/Repository.php:105)   at Illuminate\Cache\Repository->get()      (/www/wwwroot/amcrjt.com/vendor/illuminate/cache/CacheManager.php:418)   at Illuminate\Cache\CacheManager->__call()      (/www/wwwroot/amcrjt.com/vendor/illuminate/support/Facades/Facade.php:261)   at Illuminate\Support\Facades\Facade::__callStatic()      (/www/wwwroot/amcrjt.com/app/Http/Controllers/PathShowController.php:87)   at App\Http\Controllers\PathShowController->index()      (/www/wwwroot/amcrjt.com/vendor/illuminate/container/BoundMethod.php:36)   at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()      (/www/wwwroot/amcrjt.com/vendor/illuminate/container/Util.php:40)   at Illuminate\Container\Util::unwrapIfClosure()      (/www/wwwroot/amcrjt.com/vendor/illuminate/container/BoundMethod.php:93)   at Illuminate\Container\BoundMethod::callBoundMethod()      (/www/wwwroot/amcrjt.com/vendor/illuminate/container/BoundMethod.php:37)   at Illuminate\Container\BoundMethod::call()      (/www/wwwroot/amcrjt.com/vendor/illuminate/container/Container.php:653)   at Illuminate\Container\Container->call()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)   at Laravel\Lumen\Application->callControllerCallable()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)   at Laravel\Lumen\Application->callLumenController()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)   at Laravel\Lumen\Application->callControllerAction()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)   at Laravel\Lumen\Application->callActionOnArrayBasedRoute()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:262)   at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:48)   at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()      (/www/wwwroot/amcrjt.com/app/Http/Middleware/RegisterMiddleware.php:67)   at App\Http\Middleware\RegisterMiddleware->handle()      (/www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php:167)   at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)   at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()      (/www/wwwroot/amcrjt.com/app/Http/Middleware/LoggingMiddleware.php:48)   at App\Http\Middleware\LoggingMiddleware->handle()      (/www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php:167)   at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)   at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()      (/www/wwwroot/amcrjt.com/app/Http/Middleware/StaticMiddleware.php:49)   at App\Http\Middleware\StaticMiddleware->handle()      (/www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php:167)   at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)   at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()      (/www/wwwroot/amcrjt.com/app/Http/Middleware/BlackListMiddleware.php:33)   at App\Http\Middleware\BlackListMiddleware->handle()      (/www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php:167)   at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Routing/Pipeline.php:30)   at Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}()      (/www/wwwroot/amcrjt.com/vendor/illuminate/pipeline/Pipeline.php:103)   at Illuminate\Pipeline\Pipeline->then()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:426)   at Laravel\Lumen\Application->sendThroughPipeline()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:263)   at Laravel\Lumen\Application->handleFoundRoute()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:237)   at Laravel\Lumen\Application->handleDispatcherResponse()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:173)   at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:429)   at Laravel\Lumen\Application->sendThroughPipeline()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)   at Laravel\Lumen\Application->dispatch()      (/www/wwwroot/amcrjt.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)   at Laravel\Lumen\Application->run()      (/www/wwwroot/amcrjt.com/public/index.php:28)