Merge pull request #269 from DavidAnderson684/patch-13

Added missing type check
This commit is contained in:
Yahnis Elsts 2019-03-14 20:24:06 +02:00 committed by GitHub
commit 2a51e7222b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ if ( !class_exists('Puc_v4p5_Scheduler', false) ):
*/
public function upgraderProcessComplete($upgrader, $upgradeInfo){
//Sanity check
if ( !is_array($upgradeInfo) || !isset($upgradeInfo['type']) || !isset($upgradeInfo['action']) || 'update' !== $upgradeInfo['action'] ) {
//Sanity check and limitation to relevant types
if ( !is_array($upgradeInfo) || !isset($upgradeInfo['type']) || !isset($upgradeInfo['action']) || 'update' !== $upgradeInfo['action'] || !in_array($upgradeInfo['type'], array('plugin', 'theme')) ) {
return;
}