From c085ce28e8056a487f29fc31b38de5577e36dec8 Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Fri, 19 Oct 2012 17:01:16 +0000 Subject: [PATCH] Check if an update actually exists before converting to StdClass (what if $state was null?). --- plugin-update-checker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-update-checker.php b/plugin-update-checker.php index cf6c820..fc51ce2 100644 --- a/plugin-update-checker.php +++ b/plugin-update-checker.php @@ -298,7 +298,7 @@ class PluginUpdateChecker { * @return void */ private function setUpdateState($state) { - if ( $state->update instanceof PluginUpdate ) { + if ( isset($state->update) && ($state->update instanceof PluginUpdate) ) { $state->update = $state->update->toStdClass(); } update_option($this->optionName, $state);