Possibly fix issues related to new lines on different operating systems and event listeners modifiers

This commit is contained in:
Shoghi Cervantes 2014-12-05 22:43:31 +01:00
parent 20e63ae543
commit 79236c971c

View File

@ -694,13 +694,13 @@ class PluginManager{
if(!$method->isStatic()){
$priority = EventPriority::NORMAL;
$ignoreCancelled = false;
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})/m", (string) $method->getDocComment(), $matches) > 0){
$matches[1] = strtoupper($matches[1]);
if(defined(EventPriority::class . "::" . $matches[1])){
$priority = constant(EventPriority::class . "::" . $matches[1]);
}
}
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})$/m", (string) $method->getDocComment(), $matches) > 0){
if(preg_match("/^[\t ]*\\* @ignoreCancelled[\t ]{1,}([a-zA-Z]{1,})/m", (string) $method->getDocComment(), $matches) > 0){
$matches[1] = strtolower($matches[1]);
if($matches[1] === "false"){
$ignoreCancelled = false;