*
* @param array $lastErrors
*
* @return void
*/
private static function setLastErrors(array $lastErrors)
{
static::$lastErrors = $lastErrors;
}
/**
if (isset($locale)) {
setlocale(LC_NUMERIC, $locale);
}
static::setLastErrors(parent::getLastErrors());
}
/**
* Get timezone from a datetime instance.
*
*
* @return static
*/
public static function now($tz = null)
{
return new static(null, $tz);
}
/**
* Create a Carbon instance for today.
*
*
* @return int
*/
protected function currentTime()
{
return Carbon::now()->getTimestamp();
}
}
}
// If the current time is greater than expiration timestamps we will delete
// the file and return null. This helps clean up the old files and keeps
// this directory much cleaner for us as old files aren't hanging out.
if ($this->currentTime() >= $expire) {
$this->forget($key);
return $this->emptyPayload();
}
* @param string|array $key
* @return mixed
*/
public function get($key)
{
return $this->getPayload($key)['data'] ?? null;
}
/**
* Store an item in the cache for a given number of seconds.
*
{
if (is_array($key)) {
return $this->many($key);
}
$value = $this->store->get($this->itemKey($key));
// If we could not find the cache value, we will fire the missed event and get
// the default value for this cache value. This default could be a callback
// so we will execute the value function which will resolve it if needed.
if (is_null($value)) {
* @param string $key
* @return bool
*/
public function has($key)
{
return ! is_null($this->get($key));
}
/**
* Determine if an item doesn't exist in the cache.
*
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->store()->$method(...$parameters);
}
}
$plugins = get_active_plugins();
if (!empty($plugins) && is_array($plugins)) {
$loader = new ClassLoader;
$providers = [];
$namespaces = [];
if (cache()->has('plugin_namespaces') && cache()->has('plugin_providers')) {
$providers = cache('plugin_providers');
if (!is_array($providers) || empty($providers)) {
$providers = [];
}
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
* Call a string reference to a class using Class@method syntax.
* @param mixed $value
* @return mixed
*/
public static function unwrapIfClosure($value)
{
return $value instanceof Closure ? $value() : $value;
}
/**
* Get the class name of the given parameter's type, if possible.
*
if ($container->hasMethodBinding($method)) {
return $container->callMethodBinding($method, $callback[0]);
}
return Util::unwrapIfClosure($default);
}
/**
* Normalize the given callback into a Class@method string.
*
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
*
* @throws \InvalidArgumentException
*/
public function call($callback, array $parameters = [], $defaultMethod = null)
{
return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
}
/**
* Get a closure to resolve the given type from the container.
*
protected function bootProvider(ServiceProvider $provider)
{
$provider->callBootingCallbacks();
if (method_exists($provider, 'boot')) {
$this->call([$provider, 'boot']);
}
$provider->callBootedCallbacks();
}
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
// Once the application has booted we will also fire some "booted" callbacks
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->boot();
}
}
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
return __DIR__;
});
$kernel = $app->make(Kernel::class);
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);
TypeError
|
---|
TypeError: Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /home/drabyast/durbar.com.np/durbar/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98 at /home/drabyast/durbar.com.np/durbar/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:928 at Carbon\Carbon::setLastErrors() (/home/drabyast/durbar.com.np/durbar/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:98) at Carbon\Carbon->__construct() (/home/drabyast/durbar.com.np/durbar/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:252) at Carbon\Carbon::now() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Support/InteractsWithTime.php:62) at Illuminate\Cache\FileStore->currentTime() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:264) at Illuminate\Cache\FileStore->getPayload() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:61) at Illuminate\Cache\FileStore->get() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:97) at Illuminate\Cache\Repository->get() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:70) at Illuminate\Cache\Repository->has() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:418) at Illuminate\Cache\CacheManager->__call() (/home/drabyast/durbar.com.np/durbar/vendor/cyberros/plugin-management/src/Providers/PluginManagementServiceProvider.php:38) at Cyberros\PluginManagement\Providers\PluginManagementServiceProvider->boot() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36) at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Container/Util.php:40) at Illuminate\Container\Util::unwrapIfClosure() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93) at Illuminate\Container\BoundMethod::callBoundMethod() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35) at Illuminate\Container\BoundMethod::call() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Container/Container.php:653) at Illuminate\Container\Container->call() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:924) at Illuminate\Foundation\Application->bootProvider() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:905) at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() at array_walk() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:904) at Illuminate\Foundation\Application->boot() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17) at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237) at Illuminate\Foundation\Application->bootstrapWith() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:153) at Illuminate\Foundation\Http\Kernel->bootstrap() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:137) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/home/drabyast/durbar.com.np/durbar/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111) at Illuminate\Foundation\Http\Kernel->handle() (/home/drabyast/durbar.com.np/index.php:55) |