nicolasff/phpredis — Issue #68: How to check connection error with RedisArray?
Author: trong
Created: 2011-10-29 02:06:51+00:00
State: open

I use the follow code to connection to server

```php
$ra = RedisArray(array('127.0.0.1:6379'));
var_export($ra);
/* output:
RedisArray::__set_state(array(
'socket' => NULL,
))
*/
$ra->set('test', 1);
```

If server works - this code works well. After that just stop redis server and run PHP code again. The first line execute normally and return RedisArray object:

```php
var_export($ra);

RedisArray::__set_state(array(
'socket' => NULL,
))
```
but the line raise error "PHP Fatal error: Redis::set(): The object is not connected in ..."

I expected to get error of connection in the first line of code.