Differential D25207 Diff 701 src/applications/project/controller/PhabricatorProjectMoveController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectMoveController.php
Show All 18 Lines | public function handleRequest(AphrontRequest $request) { | ||||
if (!strlen($order)) { | if (!strlen($order)) { | ||||
$order = PhabricatorProjectColumnNaturalOrder::ORDERKEY; | $order = PhabricatorProjectColumnNaturalOrder::ORDERKEY; | ||||
} | } | ||||
$ordering = PhabricatorProjectColumnOrder::getOrderByKey($order); | $ordering = PhabricatorProjectColumnOrder::getOrderByKey($order); | ||||
$ordering = id(clone $ordering) | $ordering = id(clone $ordering) | ||||
->setViewer($viewer); | ->setViewer($viewer); | ||||
// When the Workboard view is "Group By <something>" the header provides | |||||
// that context in JSON form | |||||
$edit_header = null; | $edit_header = null; | ||||
$raw_header = $request->getStr('header'); | $raw_header = $request->getStr('header'); | ||||
if (strlen($raw_header)) { | if (phutil_nonempty_string($raw_header)) { | ||||
valerio.bozzolan: ✅ I verified that the above line is just null or a string
The function `phutil_nonempty_string… | |||||
$edit_header = phutil_json_decode($raw_header); | $edit_header = phutil_json_decode($raw_header); | ||||
} else { | } else { | ||||
$edit_header = array(); | $edit_header = array(); | ||||
} | } | ||||
$project = id(new PhabricatorProjectQuery()) | $project = id(new PhabricatorProjectQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->requireCapabilities( | ->requireCapabilities( | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
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
✅ I verified that the above line is just null or a string
The function phutil_nonempty_string() will report any alien type, and that is OK.