KnpLabs/KnpLastTweetsBundle — pull request #16 by Flukey (2012-06-13 14:42:50+00:00)
Title: PHP5.4 - OAuthFetcher - Even if the data array is not empty, it will still return true for the empty function

We have a valid response from the server and I checked that the array was not empty, however, when applying the function empty on the array, it always returns true.

```
if (empty($data)) {
throw new TwitterException('Received empty data from api.twitter.com');
}

```

I've added:

```
if ($data === false) {
throw new TwitterException('Received empty data from api.twitter.com');
}
```

By default, if an array is empty, it'll return false.

In the php documentation (http://fr2.php.net/empty)

It states:

5.4.0 Checking non-numeric offsets of strings returns TRUE.

5.0.0 Objects with no properties are no longer considered empty.

Perhaps this is the problem or it's a bug in php?

Let me know your thoughts.