summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_url.class')
-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);