Page MenuHomePhorge

No OneTemporary

diff --git a/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php b/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
index 23eebf60c8..949e394b91 100644
--- a/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
+++ b/src/applications/repository/xaction/PhabricatorRepositoryDefaultBranchTransaction.php
@@ -1,39 +1,39 @@
<?php
final class PhabricatorRepositoryDefaultBranchTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:default-branch';
public function generateOldValue($object) {
return $object->getDetail('default-branch');
}
public function applyInternalEffects($object, $value) {
$object->setDetail('default-branch', $value);
}
public function getTitle() {
$old = $this->getOldValue();
$new = $this->getNewValue();
- if (!strlen($new)) {
+ if (!phutil_nonempty_string($new)) {
return pht(
'%s removed %s as the default branch.',
$this->renderAuthor(),
$this->renderOldValue());
- } else if (!strlen($old)) {
+ } else if (!phutil_nonempty_string($old)) {
return pht(
'%s set the default branch to %s.',
$this->renderAuthor(),
$this->renderNewValue());
} else {
return pht(
'%s changed the default branch from %s to %s.',
$this->renderAuthor(),
$this->renderOldValue(),
$this->renderNewValue());
}
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 13:37 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125127
Default Alt Text
(1 KB)

Event Timeline