diff options
Diffstat (limited to 'includes/pear/HTTP/Header.php')
| -rwxr-xr-x[-rw-r--r--] | includes/pear/HTTP/Header.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/includes/pear/HTTP/Header.php b/includes/pear/HTTP/Header.php index 14026ad..926d79d 100644..100755 --- a/includes/pear/HTTP/Header.php +++ b/includes/pear/HTTP/Header.php @@ -382,11 +382,7 @@ class HTTP_Header extends HTTP if (is_array($param) && count($param)) { if (count($param)) { foreach ($param as $key => $val) { - if (is_string($key)) { - $qs[] = urlencode($key) .'='. urlencode($val); - } else { - $qs[] = urlencode($val) .'='. urlencode(@$GLOBALS[$val]); - } + $qs[] = ( is_string( $key ) ) ? urlencode( $key ) . '=' . urlencode( $val ) : urlencode( $val ) . '=' . urlencode( @$GLOBALS[$val] ); } } } @@ -457,7 +453,7 @@ class HTTP_Header extends HTTP function isInformational($http_code) { if ($status_type = $this->getStatusType($http_code)) { - return $status_type{0} == HTTP_HEADER_STATUS_INFORMATIONAL; + return $status_type[0] == HTTP_HEADER_STATUS_INFORMATIONAL; } else { return false; } @@ -471,7 +467,7 @@ class HTTP_Header extends HTTP function isSuccessful($http_code) { if ($status_type = $this->getStatusType($http_code)) { - return $status_type{0} == HTTP_HEADER_STATUS_SUCCESSFUL; + return $status_type[0] == HTTP_HEADER_STATUS_SUCCESSFUL; } else { return false; } @@ -485,7 +481,7 @@ class HTTP_Header extends HTTP function isRedirect($http_code) { if ($status_type = $this->getStatusType($http_code)) { - return $status_type{0} == HTTP_HEADER_STATUS_REDIRECT; + return $status_type[0] == HTTP_HEADER_STATUS_REDIRECT; } else { return false; } @@ -499,7 +495,7 @@ class HTTP_Header extends HTTP function isClientError($http_code) { if ($status_type = $this->getStatusType($http_code)) { - return $status_type{0} == HTTP_HEADER_STATUS_CLIENT_ERROR; + return $status_type[0] == HTTP_HEADER_STATUS_CLIENT_ERROR; } else { return false; } @@ -513,7 +509,7 @@ class HTTP_Header extends HTTP function isServerError($http_code) { if ($status_type = $this->getStatusType($http_code)) { - return $status_type{0} == HTTP_HEADER_STATUS_SERVER_ERROR; + return $status_type[0] == HTTP_HEADER_STATUS_SERVER_ERROR; } else { return false; } @@ -534,4 +530,3 @@ class HTTP_Header extends HTTP } /**#@-*/ } -?> |
