diff options
author | Urban Müller | 2017-02-07 16:11:32 +0100 |
---|---|---|
committer | Urban Müller | 2017-02-07 16:11:32 +0100 |
commit | fca09880bc39d2814492cee6197a76f12e715d91 (patch) | |
tree | a4436a40d8e6a79d6cb38a540b1e8f2c5a382aca | |
parent | d28d0f159f8fc26dd48e616cd51119d46aa0d56a (diff) | |
download | itools-fca09880bc39d2814492cee6197a76f12e715d91.tar.gz itools-fca09880bc39d2814492cee6197a76f12e715d91.tar.bz2 itools-fca09880bc39d2814492cee6197a76f12e715d91.zip |
textbook ternary
-rw-r--r-- | it_url.class | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class index b78aa0f..e9d3c45 100644 --- a/it_url.class +++ b/it_url.class @@ -189,10 +189,7 @@ function request($p=array()) if ($fp = @fsockopen($url->realhostname, $url->port, $dummy_errno, $errstr, $p['timeout'])) { # urlencode data pairs if is array - if (is_array($p['data'])) - $data = it_url::params($p['data']); - else - $data = $p['data']; + $data = is_array($p['data']) ? it_url::params($p['data']) : $p['data']; $p['headers'] = (array)$p['headers'] + self::_default_headers($url, $p); |