Page MenuHomePhorge

D25182.1739170480.diff
No OneTemporary

D25182.1739170480.diff

diff --git a/src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php b/src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
@@ -40,7 +40,7 @@
}
$selected = $request->getURIData('panel');
- if (!strlen($selected)) {
+ if (!phutil_nonempty_string($selected)) {
$selected = head_key($panels);
}
diff --git a/src/applications/diffusion/controller/DiffusionServeController.php b/src/applications/diffusion/controller/DiffusionServeController.php
--- a/src/applications/diffusion/controller/DiffusionServeController.php
+++ b/src/applications/diffusion/controller/DiffusionServeController.php
@@ -43,7 +43,11 @@
return null;
}
- $content_type = $request->getHTTPHeader('Content-Type');
+ if ($request->getHTTPHeader('Content-Type')) {
+ $content_type = $request->getHTTPHeader('Content-Type');
+ } else {
+ $content_type = '';
+ }
$user_agent = idx($_SERVER, 'HTTP_USER_AGENT');
$request_type = $request->getHTTPHeader('X-Phabricator-Request-Type');
diff --git a/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
--- a/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
+++ b/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
@@ -219,7 +219,7 @@
$view->addProperty(pht('Type'), $type);
$callsign = $repository->getCallsign();
- if (!strlen($callsign)) {
+ if (!phutil_nonempty_string($callsign)) {
$callsign = phutil_tag('em', array(), pht('No Callsign'));
}
$view->addProperty(pht('Callsign'), $callsign);
diff --git a/src/applications/repository/editor/PhabricatorRepositoryEditor.php b/src/applications/repository/editor/PhabricatorRepositoryEditor.php
--- a/src/applications/repository/editor/PhabricatorRepositoryEditor.php
+++ b/src/applications/repository/editor/PhabricatorRepositoryEditor.php
@@ -50,7 +50,7 @@
// If the repository does not have a local path yet, assign it one based
// on its ID. We can't do this earlier because we won't have an ID yet.
$local_path = $object->getLocalPath();
- if (!strlen($local_path)) {
+ if (!phutil_nonempty_string($local_path)) {
$local_key = 'repository.default-local-path';
$local_root = PhabricatorEnv::getEnvConfig($local_key);

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 10, 06:54 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1146776
Default Alt Text
D25182.1739170480.diff (2 KB)

Event Timeline