mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-27 05:59:08 +01:00
Fix method call on possible null
Summary: Fixes T10317. If we failed to load `$device`, it will be null, so we won't be able to call `getName()` on it. Test Plan: `SSH_CLIENT='127.0.0.1' ./bin/ssh-exec --phabricator-ssh-device xyz` no longer fatals Reviewers: chad Reviewed By: chad Maniphest Tasks: T10317 Differential Revision: https://secure.phabricator.com/D15235
This commit is contained in:
parent
7bca452fad
commit
3f920d8904
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ try {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
pht(
|
pht(
|
||||||
'Invalid device name ("%s"). There is no device with this name.',
|
'Invalid device name ("%s"). There is no device with this name.',
|
||||||
$device->getName()));
|
$device_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're authenticated as a device, but we're going to read the user out of
|
// We're authenticated as a device, but we're going to read the user out of
|
||||||
|
|
Loading…
Add table
Reference in a new issue