Skip to content

Commit 93dcefd

Browse files
committed
MyMemory çevirici sınıfında hata kontrolü güncellendi; yanıt durumunu kontrol etmek için 200 dışındaki durumlar için metin döndürme mantığı değiştirildi.
1 parent ba3bee1 commit 93dcefd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Translators/MyMemoryTranslator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public function handle(string $source, string $target, string $text): string
2424

2525
$data = $response->json();
2626

27-
$status = data_get($data, 'responseStatus', 0);
27+
$status = (int) data_get($data, 'responseStatus', 200);
2828

29-
if ($status === '403') {
29+
if ($status !== 200) {
3030
return $text;
3131
}
3232

0 commit comments

Comments
 (0)