### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
871 | 871 | if ( ! $handle ) |
872 | 872 | return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); |
873 | 873 | |
874 | | $timeout = (int) floor( $r['timeout'] ); |
875 | | $utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000; |
876 | | stream_set_timeout( $handle, $timeout, $utimeout ); |
| 874 | $timeout_int = (int) $r['timeout']; |
| 875 | $timeout_micro = ( $r['timeout'] - $timeout_int ) * 1000000; |
| 876 | stream_set_timeout( $handle, $timeout_int, $timeout_micro ); |
877 | 877 | |
878 | 878 | if ( ! $r['blocking'] ) { |
879 | 879 | stream_set_blocking($handle, 0); |