Skip to content

Commit

Permalink
[-] CORE : Fix #PSCSX-4794 correct abstrat class removeoverride
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha Froment committed Mar 2, 2015
1 parent d7a8fe0 commit 8277d82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/module/Module.php
Expand Up @@ -1064,7 +1064,7 @@ protected static function coreLoadModule($module_name)
$time_start = microtime(true);
$memory_start = memory_get_usage(true);
}

include_once(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php');

$r = false;
Expand Down Expand Up @@ -2750,7 +2750,7 @@ public function removeOverride($classname)
$code .= $line;
}

$to_delete = preg_match('/<\?(?:php)?\s+class\s+'.$classname.'\s+extends\s+'.$classname.'Core\s*?[{]\s*?[}]/ism', $code);
$to_delete = preg_match('/<\?(?:php)?\s+(?:abstract|interface)?\s*?class\s+'.$classname.'\s+extends\s+'.$classname.'Core\s*?[{]\s*?[}]/ism', $code);
}

if (!isset($to_delete) || $to_delete)
Expand Down

0 comments on commit 8277d82

Please sign in to comment.