Skip to content

Commit

Permalink
Ensure that ->state is an array, otherwise initialization of keys can…
Browse files Browse the repository at this point in the history
… fail.
  • Loading branch information
Alex Barth committed Sep 26, 2010
1 parent 35e491c commit fd1c70f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/FeedsSource.inc
Expand Up @@ -296,6 +296,9 @@ class FeedsSource extends FeedsConfigurable {
*/
public function state(FeedsSourceInterface $client) {
$class = get_class($client);
if (!is_array($this->state)) {
$this->state = array();
}
if (!isset($this->state[$class])) {
$this->state[$class] = new FeedsState();
}
Expand Down

0 comments on commit fd1c70f

Please sign in to comment.