diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-06-21 12:42:37 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-06-21 12:42:37 +0300 |
| commit | 1215afa6ef28a6e0a53aab98263e922b7c66a580 (patch) | |
| tree | d19433bc751e2e70fc98b2c6965ed7ba8a591e36 /classes | |
| parent | b37e5986cf392132b5fd773d9f3e0f25f7f1886b (diff) | |
| download | the-epube-1215afa6ef28a6e0a53aab98263e922b7c66a580.tar.gz the-epube-1215afa6ef28a6e0a53aab98263e922b7c66a580.tar.xz | |
stop passing actual curl error to frontend if define word handler fails
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/Handler/DefineHandler.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/Handler/DefineHandler.php b/classes/Handler/DefineHandler.php index f15885f..3da21da 100644 --- a/classes/Handler/DefineHandler.php +++ b/classes/Handler/DefineHandler.php @@ -53,7 +53,11 @@ class DefineHandler implements RequestHandlerInterface, AuthRequired $word = mb_substr($word, 0, mb_strlen($word) - 1); } } else { - array_push($result, curl_error($ch)); + $curlErr = curl_error($ch); + if ($curlErr) { + user_error("dictd define lookup failed for '$word': $curlErr", E_USER_WARNING); + } + array_push($result, "Dictionary lookup failed. Please try again later."); } curl_close($ch); |
