Check if an update actually exists before converting to StdClass (what if $state was null?).

This commit is contained in:
Yahnis Elsts 2012-10-19 17:01:16 +00:00
parent 6206797e75
commit c085ce28e8
1 changed files with 1 additions and 1 deletions

View File

@ -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);