Skip to content

Commit

Permalink
Throw exception if <stability> is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Dec 11, 2017
1 parent 391f99a commit 56d7676
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Horde/Pear/Package/Xml.php
Expand Up @@ -539,6 +539,9 @@ public function setState($rel_state = null, $api_state = null)
$this->_requireCurrentRelease()
);
$stability = $this->findNode('/p:package/p:stability');
if (!$stability) {
throw new Horde_Pear_Exception('No <stability> tag found');
}
if ($rel_state) {
$this->replaceTextNodeRelativeTo(
'./p:release', $stability, $rel_state
Expand Down

0 comments on commit 56d7676

Please sign in to comment.