Học sinh giỏi cấp tỉnh có được tuyển thẳng

//////////

if ($this->useLocking) { // ignoring errors here, there's not much we can do about them flock($this->stream, LOCK_EX); } $this->streamWrite($this->stream, $record); if ($this->useLocking) { flock($this->stream, LOCK_UN); } } /** * Write to stream * @param resource $stream * @param array $record */ protected function streamWrite($stream, array $record) { fwrite($stream, (string) $record['formatted']); } private function customErrorHandler($code, $msg) { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); } /** * @param string $stream * * @return null|string */ private function getDirFromStream($stream) { $pos = strpos($stream, '://'); if ($pos === false) { return dirname($stream); } if ('file://' === substr($stream, 0, 7)) {

Arguments

  1. "fwrite(): write of 1806 bytes failed with errno=28 No space left on device"

//////////

if ($this->useLocking) { // ignoring errors here, there's not much we can do about them flock($this->stream, LOCK_EX); } $this->streamWrite($this->stream, $record); if ($this->useLocking) { flock($this->stream, LOCK_UN); } } /** * Write to stream * @param resource $stream * @param array $record */ protected function streamWrite($stream, array $record) { fwrite($stream, (string) $record['formatted']); } private function customErrorHandler($code, $msg) { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); } /** * @param string $stream * * @return null|string */ private function getDirFromStream($stream) { $pos = strpos($stream, '://'); if ($pos === false) { return dirname($stream); } if ('file://' === substr($stream, 0, 7)) {

Arguments

  1. stream resource @518 : false : true : false : "plainfile" : "STDIO" : "a" : 0 : true : "/home/ts/public_html/storage/logs/laravel.log" : [] }
  2. """ [2022-07-13 12:16:36] local.ERROR: file_put_contents(): write of 243 bytes failed with errno=28 No space left on device {"exception":"[object] (ErrorException(code: 0): file_put_contents(): write of 243 bytes failed with errno=28 No space left on device at /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122)\n [stacktrace]\n #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'file_put_conten...', '/home/ts/public...', 122, Array)\n #1 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/home/ts/public...', 'a:3:{s:6:\"_toke...', 2)\n #2 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(83): Illuminate\\Filesystem\\Filesystem->put('/home/ts/public...', 'a:3:{s:6:\"_toke...', true)\n #3 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Store.php(128): Illuminate\\Session\\FileSessionHandler->write('7coeMR00YCfs9Gy...', 'a:3:{s:6:\"_toke...')\n #4 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): Illuminate\\Session\\Store->save()\n #5 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\\Session\\Middleware\\StartSession->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #6 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #7 /home/ts/public_html/index.php(62): Illuminate\\Foundation\\Http\\Kernel->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #8 {main}\n "} \n """

//////////

$this->createDir(); $this->errorMessage = null; set_error_handler(array($this, 'customErrorHandler')); $this->stream = fopen($this->url, 'a'); if ($this->filePermission !== null) { @chmod($this->url, $this->filePermission); } restore_error_handler(); if (!is_resource($this->stream)) { $this->stream = null; throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url)); } } if ($this->useLocking) { // ignoring errors here, there's not much we can do about them flock($this->stream, LOCK_EX); } $this->streamWrite($this->stream, $record); if ($this->useLocking) { flock($this->stream, LOCK_UN); } } /** * Write to stream * @param resource $stream * @param array $record */ protected function streamWrite($stream, array $record) { fwrite($stream, (string) $record['formatted']); } private function customErrorHandler($code, $msg) { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); }

Arguments

  1. stream resource @518 : false : true : false : "plainfile" : "STDIO" : "a" : 0 : true : "/home/ts/public_html/storage/logs/laravel.log" : [] }
  2. array:8 [ "message" => "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" "context" => array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ] "level" => 400 "level_name" => "ERROR" "channel" => "local" "datetime" => DateTime @1657714596 { : 2022-07-13 12:16:36.293371 UTC (+00:00) } "extra" => [] "formatted" => """ [2022-07-13 12:16:36] local.ERROR: file_put_contents(): write of 243 bytes failed with errno=28 No space left on device {"exception":"[object] (ErrorException(code: 0): file_put_contents(): write of 243 bytes failed with errno=28 No space left on device at /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122)\n [stacktrace]\n #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'file_put_conten...', '/home/ts/public...', 122, Array)\n #1 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/home/ts/public...', 'a:3:{s:6:\"_toke...', 2)\n #2 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(83): Illuminate\\Filesystem\\Filesystem->put('/home/ts/public...', 'a:3:{s:6:\"_toke...', true)\n #3 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Store.php(128): Illuminate\\Session\\FileSessionHandler->write('7coeMR00YCfs9Gy...', 'a:3:{s:6:\"_toke...')\n #4 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): Illuminate\\Session\\Store->save()\n #5 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\\Session\\Middleware\\StartSession->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #6 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #7 /home/ts/public_html/index.php(62): Illuminate\\Foundation\\Http\\Kernel->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #8 {main}\n "} \n """ ]

//////////

AbstractProcessingHandler.php

* * @author Jordi Boggiano <> * @author Christophe Coevoet <> */ abstract class AbstractProcessingHandler extends AbstractHandler { /** * {@inheritdoc} */ public function handle(array $record) { if (!$this->isHandling($record)) { return false; } $record = $this->processRecord($record); $record['formatted'] = $this->getFormatter()->format($record); $this->write($record); return false === $this->bubble; } /** * Writes the record down to the log of the implementing handler * * @param array $record * @return void */ abstract protected function write(array $record); /** * Processes a record. * * @param array $record * @return array */ protected function processRecord(array $record) {

Arguments

  1. array:8 [ "message" => "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" "context" => array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ] "level" => 400 "level_name" => "ERROR" "channel" => "local" "datetime" => DateTime @1657714596 { : 2022-07-13 12:16:36.293371 UTC (+00:00) } "extra" => [] "formatted" => """ [2022-07-13 12:16:36] local.ERROR: file_put_contents(): write of 243 bytes failed with errno=28 No space left on device {"exception":"[object] (ErrorException(code: 0): file_put_contents(): write of 243 bytes failed with errno=28 No space left on device at /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122)\n [stacktrace]\n #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'file_put_conten...', '/home/ts/public...', 122, Array)\n #1 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/home/ts/public...', 'a:3:{s:6:\"_toke...', 2)\n #2 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(83): Illuminate\\Filesystem\\Filesystem->put('/home/ts/public...', 'a:3:{s:6:\"_toke...', true)\n #3 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Store.php(128): Illuminate\\Session\\FileSessionHandler->write('7coeMR00YCfs9Gy...', 'a:3:{s:6:\"_toke...')\n #4 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): Illuminate\\Session\\Store->save()\n #5 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\\Session\\Middleware\\StartSession->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #6 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #7 /home/ts/public_html/index.php(62): Illuminate\\Foundation\\Http\\Kernel->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #8 {main}\n "} \n """ ]

/////////

$ts = new \DateTime(null, static::$timezone); } $ts->setTimezone(static::$timezone); $record = array( 'message' => (string) $message, 'context' => $context, 'level' => $level, 'level_name' => $levelName, 'channel' => $this->name, 'datetime' => $ts, 'extra' => array(), ); foreach ($this->processors as $processor) { $record = call_user_func($processor, $record); } while ($handler = current($this->handlers)) { if (true === $handler->handle($record)) { break; } next($this->handlers); } return true; } /** * Adds a log record at the DEBUG level. * * @param string $message The log message * @param array $context The log context * @return Boolean Whether the record has been processed */ public function addDebug($message, array $context = array()) { return $this->addRecord(static::DEBUG, $message, $context); }

Arguments

  1. array:8 [ "message" => "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" "context" => array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ] "level" => 400 "level_name" => "ERROR" "channel" => "local" "datetime" => DateTime @1657714596 { : 2022-07-13 12:16:36.293371 UTC (+00:00) } "extra" => [] "formatted" => """ [2022-07-13 12:16:36] local.ERROR: file_put_contents(): write of 243 bytes failed with errno=28 No space left on device {"exception":"[object] (ErrorException(code: 0): file_put_contents(): write of 243 bytes failed with errno=28 No space left on device at /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122)\n [stacktrace]\n #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'file_put_conten...', '/home/ts/public...', 122, Array)\n #1 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/home/ts/public...', 'a:3:{s:6:\"_toke...', 2)\n #2 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/FileSessionHandler.php(83): Illuminate\\Filesystem\\Filesystem->put('/home/ts/public...', 'a:3:{s:6:\"_toke...', true)\n #3 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Store.php(128): Illuminate\\Session\\FileSessionHandler->write('7coeMR00YCfs9Gy...', 'a:3:{s:6:\"_toke...')\n #4 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(87): Illuminate\\Session\\Store->save()\n #5 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\\Session\\Middleware\\StartSession->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #6 /home/ts/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #7 /home/ts/public_html/index.php(62): Illuminate\\Foundation\\Http\\Kernel->terminate(Object(Illuminate\\Http\\Request), Object(Illuminate\\Http\\Response))\n #8 {main}\n "} \n """ ]

/////////

* @param array $context The log context * @return Boolean Whether the record has been processed */ public function err($message, array $context = array()) { return $this->addRecord(static::ERROR, $message, $context); } /** * Adds a log record at the ERROR level. * * This method allows for compatibility with common interfaces. * * @param string $message The log message * @param array $context The log context * @return Boolean Whether the record has been processed */ public function error($message, array $context = array()) { return $this->addRecord(static::ERROR, $message, $context); } /** * Adds a log record at the CRITICAL level. * * This method allows for compatibility with common interfaces. * * @param string $message The log message * @param array $context The log context * @return Boolean Whether the record has been processed */ public function crit($message, array $context = array()) { return $this->addRecord(static::CRITICAL, $message, $context); } /** * Adds a log record at the CRITICAL level. * * This method allows for compatibility with common interfaces.

Arguments

  1. 400
  2. "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device"
  3. array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ]

//////////

* @return void */ public function write($level, $message, array $context = []) { $this->writeLog($level, $message, $context); } /** * Write a message to Monolog. * * @param string $level * @param string $message * @param array $context * @return void */ protected function writeLog($level, $message, $context) { $this->fireLogEvent($level, $message = $this->formatMessage($message), $context); $this->monolog->{$level}($message, $context); } /** * Register a file log handler. * * @param string $path * @param string $level * @return void */ public function useFiles($path, $level = 'debug') { $this->monolog->pushHandler($handler = new StreamHandler($path, $this->parseLevel($level))); $handler->setFormatter($this->getDefaultFormatter()); } /** * Register a daily file log handler. * * @param string $path

Arguments

  1. "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device"
  2. array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ]

//////////

* * @param string $message * @param array $context * @return void */ public function critical($message, array $context = []) { $this->writeLog(__FUNCTION__, $message, $context); } /** * Log an error message to the logs. * * @param string $message * @param array $context * @return void */ public function error($message, array $context = []) { $this->writeLog(__FUNCTION__, $message, $context); } /** * Log a warning message to the logs. * * @param string $message * @param array $context * @return void */ public function warning($message, array $context = []) { $this->writeLog(__FUNCTION__, $message, $context); } /** * Log a notice to the logs. * * @param string $message * @param array $context * @return void

Arguments

  1. "error"
  2. "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device"
  3. array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ]

///////////

*/ public function report(Exception $e) { if ($this->shouldntReport($e)) { return; } if (method_exists($e, 'report')) { return $e->report(); } try { $logger = $this->container->make(LoggerInterface::class); } catch (Exception $ex) { throw $e; // throw the original exception } $logger->error( $e->getMessage(), array_merge($this->context(), ['exception' => $e] )); } /** * Determine if the exception should be reported. * * @param \Exception $e * @return bool */ public function shouldReport(Exception $e) { return ! $this->shouldntReport($e); } /** * Determine if the exception is in the "do not report" list. * * @param \Exception $e * @return bool */

Arguments

  1. "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device"
  2. array:1 [ "exception" => ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE } ]

//////

* A list of the inputs that are never flashed for validation exceptions. * * @var array */ protected $dontFlash = [ 'password', 'password_confirmation', ]; /** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $exception * @return void */ public function report(Exception $exception) { parent::report($exception); } /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $exception * @return \Illuminate\Http\Response */ public function render($request, Exception $exception) { if($this->isHttpException($exception)){ switch ($exception->getStatusCode()) { case '404': return redirect()->route('404'); break; case '500': return redirect()->route('500'); break; default:

Arguments

  1. ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE }

///////////

} /** * Handle an uncaught exception from the application. * * Note: Most exceptions can be handled via the try / catch block in * the HTTP and Console kernels. But, fatal error exceptions must * be handled differently since they are not normal exceptions. * * @param \Throwable $e * @return void */ public function handleException($e) { if (! $e instanceof Exception) { $e = new FatalThrowableError($e); } try { $this->getExceptionHandler()->report($e); } catch (Exception $e) { // } if ($this->app->runningInConsole()) { $this->renderForConsole($e); } else { $this->renderHttpResponse($e); } } /** * Render an exception to the console. * * @param \Exception $e * @return void */ protected function renderForConsole(Exception $e) { $this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e);

Arguments

  1. ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE }

Arguments

  1. ErrorException { #message: "file_put_contents(): write of 243 bytes failed with errno=28 No space left on device" #code: 0 #file: "/home/ts/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php" #line: 122 #severity: E_NOTICE }