Check if an update actually exists before converting to StdClass (what if $state was null?).
This commit is contained in:
parent
6206797e75
commit
c085ce28e8
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue