| @@ -55,8 +55,15 @@ | ||
| 55 | 55 | $this->timeout, |
| 56 | 56 | STREAM_CLIENT_CONNECT |
| 57 | 57 | ); |
| 58 | 58 | if ( ! $sock ) { |
| 59 | + // See class-redis-client.php: the `@`-suppressed warning still | |
| 60 | + // lingers in error_get_last(), which WP reads to tag the admin | |
| 61 | + // page `php-error` (empty banner above the menu). We handle the | |
| 62 | + // failure gracefully, so clear it. | |
| 63 | + if ( function_exists( 'error_clear_last' ) ) { | |
| 64 | + error_clear_last(); | |
| 65 | + } | |
| 59 | 66 | return false; |
| 60 | 67 | } |
| 61 | 68 | stream_set_timeout( $sock, (int) $this->timeout, (int) ( ( $this->timeout - (int) $this->timeout ) * 1000000 ) ); |
| 62 | 69 | $this->sock = $sock; |