mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 12:47:39 +02:00
Make sure MercurialProcessor fails gracefully
This commit is contained in:
@@ -51,9 +51,13 @@ class MercurialProcessor
|
||||
}
|
||||
|
||||
$result = explode(' ', trim(`hg id -nb`));
|
||||
return self::$cache = array(
|
||||
'branch' => $result[1],
|
||||
'revision' => $result[2],
|
||||
);
|
||||
if (count($result) >= 3) {
|
||||
return self::$cache = array(
|
||||
'branch' => $result[1],
|
||||
'revision' => $result[2],
|
||||
);
|
||||
}
|
||||
|
||||
return self::$cache = array();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user