mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16: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`));
|
$result = explode(' ', trim(`hg id -nb`));
|
||||||
|
if (count($result) >= 3) {
|
||||||
return self::$cache = array(
|
return self::$cache = array(
|
||||||
'branch' => $result[1],
|
'branch' => $result[1],
|
||||||
'revision' => $result[2],
|
'revision' => $result[2],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return self::$cache = array();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user