summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2017-02-07 16:11:32 +0100
committerUrban Müller2017-02-07 16:11:32 +0100
commitfca09880bc39d2814492cee6197a76f12e715d91 (patch)
treea4436a40d8e6a79d6cb38a540b1e8f2c5a382aca
parentd28d0f159f8fc26dd48e616cd51119d46aa0d56a (diff)
downloaditools-fca09880bc39d2814492cee6197a76f12e715d91.tar.gz
itools-fca09880bc39d2814492cee6197a76f12e715d91.tar.bz2
itools-fca09880bc39d2814492cee6197a76f12e715d91.zip
textbook ternary
-rw-r--r--it_url.class5
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);