Initialize the $sections property with a default value (empty array).
This way we don't need to check if it's initialised.
This commit is contained in:
parent
8ec6aad7b9
commit
026fb99eef
|
|
@ -60,7 +60,6 @@ class PucGitHubChecker_3_0 extends PluginUpdateChecker_3_0 {
|
||||||
$info = new PluginInfo_3_0();
|
$info = new PluginInfo_3_0();
|
||||||
$info->filename = $this->pluginFile;
|
$info->filename = $this->pluginFile;
|
||||||
$info->slug = $this->slug;
|
$info->slug = $this->slug;
|
||||||
$info->sections = array();
|
|
||||||
|
|
||||||
$this->setInfoFromHeader($this->getPluginHeader(), $info);
|
$this->setInfoFromHeader($this->getPluginHeader(), $info);
|
||||||
|
|
||||||
|
|
@ -382,9 +381,6 @@ class PucGitHubChecker_3_0 extends PluginUpdateChecker_3_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !isset($pluginInfo->sections) ) {
|
|
||||||
$pluginInfo->sections = array();
|
|
||||||
}
|
|
||||||
if ( !empty($fileHeader['Description']) ) {
|
if ( !empty($fileHeader['Description']) ) {
|
||||||
$pluginInfo->sections['description'] = $fileHeader['Description'];
|
$pluginInfo->sections['description'] = $fileHeader['Description'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -842,7 +842,7 @@ class PluginInfo_3_0 {
|
||||||
public $slug;
|
public $slug;
|
||||||
public $version;
|
public $version;
|
||||||
public $homepage;
|
public $homepage;
|
||||||
public $sections;
|
public $sections = array();
|
||||||
public $banners;
|
public $banners;
|
||||||
public $download_url;
|
public $download_url;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue