Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Undefined variable: int_data

Exception

ErrorException

  1.         $response curl_exec($curl);
  2.         curl_close($curl);
  3.         $json json_decode($response,1);
  4.                 if ($json === null
  5.             && json_last_error() !== JSON_ERROR_NONE) {
  6.                 $int_data str_replace(['\\"','\\'], ''$int_data);
  7.                 $json json_decode($int_data,1);
  8.         }
  9.         return $json;
  10.     }
  11.     public function slug2text($var){
  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/mobilagu.com/app/Utils/Youtube.php (line 32)
  1.         $response curl_exec($curl);
  2.         curl_close($curl);
  3.         $json json_decode($response,1);
  4.                 if ($json === null
  5.             && json_last_error() !== JSON_ERROR_NONE) {
  6.                 $int_data str_replace(['\\"','\\'], ''$int_data);
  7.                 $json json_decode($int_data,1);
  8.         }
  9.         return $json;
  10.     }
  11.     public function slug2text($var){
Youtube->http2api() in /www/wwwroot/mobilagu.com/app/Utils/Youtube.php (line 152)
  1.             }
  2.         }
  3.         return $data;
  4.     }
  5.     function getData($ytid){
  6.         $result $this->http2api('video',['url'=>'https://www.youtube.com/watch?v='.$ytid]);
  7.         return $result;
  8.     }
  9.     function cleanText($str){
  10.         $str preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function ($match) {
  11.             return mb_convert_encoding(pack('H*'$match[1]), 'UTF-8''UTF-16BE');
  1.         Storage::disk('local')->put($fileNameimplode("\n"array_filter(array_unique($file))));
  2.     }
  3.     return $file;
  4.     }
  5.     public function download($ytid,$slug){
  6.         $data = ['related'=>array_reverse($this->Yt->trending()),'info'=>($this->Yt->getData($ytid))];
  7.         return view('downloads',compact('data'));
  8.     }
  9.     //
  10. }
  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.     /**
  9.      * Call a string reference to a class using Class@method syntax.
in /www/wwwroot/mobilagu.com/vendor/illuminate/container/Util.php :: Illuminate\Container\{closure} (line 40)
  1.      * @param  mixed  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  1.      */
  2.     protected function callControllerCallable(callable $callable, array $parameters = [])
  3.     {
  4.         try {
  5.             return $this->prepareResponse(
  6.                 $this->call($callable$parameters)
  7.             );
  8.         } catch (HttpResponseException $e) {
  9.             return $e->getResponse();
  10.         }
  11.     }
  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.     /**
  1.         if (! method_exists($instance $this->make($controller), $method)) {
  2.             throw new NotFoundHttpException;
  3.         }
  4.         if ($instance instanceof LumenController) {
  5.             return $this->callLumenController($instance$method$routeInfo);
  6.         } else {
  7.             return $this->callControllerCallable(
  8.                 [$instance$method], $routeInfo[2]
  9.             );
  10.         }
  1.     protected function callActionOnArrayBasedRoute($routeInfo)
  2.     {
  3.         $action $routeInfo[1];
  4.         if (isset($action['uses'])) {
  5.             return $this->prepareResponse($this->callControllerAction($routeInfo));
  6.         }
  7.         foreach ($action as $value) {
  8.             if ($value instanceof Closure) {
  9.                 $callable $value->bindTo(new RoutingClosure);
  1.                 return $this->callActionOnArrayBasedRoute($this['request']->route());
  2.             }));
  3.         }
  4.         return $this->prepareResponse(
  5.             $this->callActionOnArrayBasedRoute($routeInfo)
  6.         );
  7.     }
  8.     /**
  9.      * Call the Closure or invokable on the array based route.
  1.             case Dispatcher::NOT_FOUND:
  2.                 throw new NotFoundHttpException;
  3.             case Dispatcher::METHOD_NOT_ALLOWED:
  4.                 throw new MethodNotAllowedHttpException($routeInfo[1]);
  5.             case Dispatcher::FOUND:
  6.                 return $this->handleFoundRoute($routeInfo);
  7.         }
  8.     }
  9.     /**
  10.      * Handle a route found by the dispatcher.
  1.                 if (isset($this->router->getRoutes()[$method.$pathInfo])) {
  2.                     return $this->handleFoundRoute([true$this->router->getRoutes()[$method.$pathInfo]['action'], []]);
  3.                 }
  4.                 return $this->handleDispatcherResponse(
  5.                     $this->createDispatcher()->dispatch($method$pathInfo)
  6.                 );
  7.             });
  8.         } catch (Throwable $e) {
  9.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  10.         }
  1.                 ->send($this->make('request'))
  2.                 ->through($middleware)
  3.                 ->then($then);
  4.         }
  5.         return $then($this->make('request'));
  6.     }
  7.     /**
  8.      * Prepare the response for sending.
  9.      *
  1.                 }
  2.                 return $this->handleDispatcherResponse(
  3.                     $this->createDispatcher()->dispatch($method$pathInfo)
  4.                 );
  5.             });
  6.         } catch (Throwable $e) {
  7.             return $this->prepareResponse($this->sendExceptionToHandler($e));
  8.         }
  9.     }
  1.      * @param  \Symfony\Component\HttpFoundation\Request|null  $request
  2.      * @return void
  3.      */
  4.     public function run($request null)
  5.     {
  6.         $response $this->dispatch($request);
  7.         if ($response instanceof SymfonyResponse) {
  8.             $response->send();
  9.         } else {
  10.             echo (string) $response;
Application->run() in /www/wwwroot/mobilagu.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:
Undefined variable: int_data

  at /www/wwwroot/mobilagu.com/app/Utils/Youtube.php:32
  at Laravel\Lumen\Application->handleError()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/www/wwwroot/mobilagu.com/app/Utils/Youtube.php:32)
  at App\Utils\Youtube->http2api()
     (/www/wwwroot/mobilagu.com/app/Utils/Youtube.php:152)
  at App\Utils\Youtube->getData()
     (/www/wwwroot/mobilagu.com/app/Http/Controllers/PageController.php:98)
  at App\Http\Controllers\PageController->download()
     (/www/wwwroot/mobilagu.com/vendor/illuminate/container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/www/wwwroot/mobilagu.com/vendor/illuminate/container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/www/wwwroot/mobilagu.com/vendor/illuminate/container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/www/wwwroot/mobilagu.com/vendor/illuminate/container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/www/wwwroot/mobilagu.com/vendor/illuminate/container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:389)
  at Laravel\Lumen\Application->callControllerCallable()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:355)
  at Laravel\Lumen\Application->callLumenController()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:329)
  at Laravel\Lumen\Application->callControllerAction()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:282)
  at Laravel\Lumen\Application->callActionOnArrayBasedRoute()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:267)
  at Laravel\Lumen\Application->handleFoundRoute()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:237)
  at Laravel\Lumen\Application->handleDispatcherResponse()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:173)
  at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:429)
  at Laravel\Lumen\Application->sendThroughPipeline()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:175)
  at Laravel\Lumen\Application->dispatch()
     (/www/wwwroot/mobilagu.com/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
  at Laravel\Lumen\Application->run()
     (/www/wwwroot/mobilagu.com/public/index.php:28)