Skip to content

Commit

Permalink
update index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosun18 committed Dec 11, 2023
1 parent 5591a4a commit bb1867d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@
$statusCode = $e->getResponse()->getStatusCode();
$this->get('flash')->addMessage('error', 'Ошибка ' .
$statusCode . ' при проверке страницы (внутренняя ошибка сервера)');
return $response->withRedirect($router->urlFor('show', ['id' => $urlId]));
return $response->withRedirect($this->get('router')->urlFor('show', ['id' => $urlId]));
} catch (GuzzleHttp\Exception\GuzzleException) {
$this->get('flash')->addMessage('error', 'Ошибка при проверке страницы (Connection timed out)');
return $response->withRedirect($router->urlFor('show', ['id' => $urlId]));
return $response->withRedirect($this->get('router')->urlFor('show', ['id' => $urlId]));
}
$document = new Document((string) $result->getBody());
$h1 = optional($document->first('h1'))->text();
Expand Down

0 comments on commit bb1867d

Please sign in to comment.