We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1675f78 commit ac577bcCopy full SHA for ac577bc
src/WpOrg/Api/Client.php
@@ -7,6 +7,7 @@
7
use Composer\Downloader\TransportException;
8
use Composer\Util\HttpDownloader;
9
use Composer\Util\Loop;
10
+use Composer\Util\SyncHelper;
11
use React\Promise\PromiseInterface;
12
13
use function React\Promise\resolve;
@@ -22,6 +23,15 @@ public function __construct(
22
23
24
public function isClosed(string $slug): bool
25
{
26
+ $slug = trim($slug);
27
+ if ($slug === '') {
28
+ return false;
29
+ }
30
+
31
+ if (array_key_exists($slug, $this->isClosed)) {
32
+ return $this->isClosed[$slug];
33
34
35
$promise = $this->fetchIsClosedAsync($slug)
36
->then(fn (bool $isClosed) => $this->isClosed[$slug] = $isClosed);
37
0 commit comments