Skip to content

Commit

Permalink
fix: ignore curl exceptions when closing webdriver inside destructor (F…
Browse files Browse the repository at this point in the history
…ixes #466, fixes #544)
  • Loading branch information
mtorromeo authored and dunglas committed Jan 8, 2025
1 parent 649b0a9 commit fed876e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\Exception\TimeoutException;
use Facebook\WebDriver\Exception\WebDriverCurlException;
use Facebook\WebDriver\JavaScriptExecutor;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriver;
Expand Down Expand Up @@ -107,7 +108,11 @@ public function __wakeup(): void

public function __destruct()
{
$this->quit();
try {
$this->quit();
} catch (WebDriverCurlException) {

Check failure on line 113 in src/Client.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Caught class Facebook\WebDriver\Exception\WebDriverCurlException not found.
// ignore
}
}

public function start(): void
Expand Down

0 comments on commit fed876e

Please sign in to comment.