diff options
author | Christian Schneider | 2024-05-02 17:24:18 +0200 |
---|---|---|
committer | Christian Schneider | 2024-05-02 17:24:18 +0200 |
commit | 0bb9584e5198777d6836e3ccfad1b18e9b266891 (patch) | |
tree | a4b1a4248990d1014b8020074ce2f233877720e7 | |
parent | b1b06fc503373630d49bcc9adff916ae94e2552a (diff) | |
download | itools-0bb9584e5198777d6836e3ccfad1b18e9b266891.tar.gz itools-0bb9584e5198777d6836e3ccfad1b18e9b266891.tar.bz2 itools-0bb9584e5198777d6836e3ccfad1b18e9b266891.zip |
Reenable warnings about behaviour change when switching body_on_fail default
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index 53705c4..e6e0ddf 100644 --- a/it_url.class +++ b/it_url.class @@ -361,8 +361,8 @@ function request($p=array()) else { # FIXME 2024-06 CS Send a notice in cases where changing the default to body_on_fail=false would change result for text results - #if ($url->result >= 400 && $url->data && !isset($p['body_on_fail']) && it::match('^text/', $url->headers['Content-Type'])) - # it::error(['to' => 'schneider@search.ch', 'title' => 'Failing it_url::get() without body_on_fail but non-empty data', 'body' => ['p' => $p, 'url' => $url]]); + if ($url->result >= 400 && $url->data && !isset($p['body_on_fail']) && it::match('^text/', $url->headers['Content-Type'])) + it::error(['to' => 'schneider@search.ch', 'title' => 'Failing it_url::get() without body_on_fail but non-empty data', 'body' => ['p' => $p, 'url' => $url]]); if ($url->result >= 400 && ((isset($p['body_on_fail']) && !$p['body_on_fail']) || $p['empty_on_fail'] || $p['keepfailed'])) # FIXME 2024-06 CS Remove deprecated empty_on_fail support $got = $url->data = false; |