Differential D25031 Diff 83 src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/xaction/PhabricatorAuthFactorProviderNameTransaction.php
Context not available. | |||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
$new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
if (!strlen($old)) { | if (!@strlen($old)) { | ||||
return pht( | return pht( | ||||
'%s named this provider %s.', | '%s named this provider %s.', | ||||
$this->renderAuthor(), | $this->renderAuthor(), | ||||
$this->renderNewValue()); | $this->renderNewValue()); | ||||
} else if (!strlen($new)) { | } else if (!@strlen($new)) { | ||||
return pht( | return pht( | ||||
'%s removed the name (%s) of this provider.', | '%s removed the name (%s) of this provider.', | ||||
$this->renderAuthor(), | $this->renderAuthor(), | ||||
Context not available. | |||||
$max_length = $object->getColumnMaximumByteLength('name'); | $max_length = $object->getColumnMaximumByteLength('name'); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$new_value = $xaction->getNewValue(); | $new_value = $xaction->getNewValue(); | ||||
$new_length = strlen($new_value); | $new_length = @strlen($new_value); | ||||
if ($new_length > $max_length) { | if ($new_length > $max_length) { | ||||
$errors[] = $this->newInvalidError( | $errors[] = $this->newInvalidError( | ||||
pht( | pht( | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0