@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix variable issue on Conpherence draft saving pathway

Summary:
When we save a Conpherence draft, the draft part works fine but `$xactions` never gets defined, so this gets hit a little later on:

[24-Feb-2014 11:46:10] WARNING: [pool www] child 82805 said into stderr: "NOTICE: PHP message: [2014-02-24 11:46:10] EXCEPTION: (RuntimeException) Undefined variable: xactions at [/INSECURE/devtools/libphutil/src/error/PhutilErrorHandler.php:211]"
[24-Feb-2014 11:46:10] WARNING: [pool www] child 82805 said into stderr: "NOTICE: PHP message: #0 PhutilErrorHandler::handleError(8, Undefined variable: xactions, /INSECURE/devtools/phabricator/src/applications/conpherence/controller/ConpherenceUpdateController.php, 122, Array of size 13 starting with: { request => Object AphrontRequest }) called at [/INSECURE/devtools/phabricator/src/applications/conpherence/controller/ConpherenceUpdateController.php:122]"
[24-Feb-2014 11:46:10] WARNING: [pool www] child 82805 said into stderr: "NOTICE: PHP message: #1 ConpherenceUpdateController::processRequest() called at [/INSECURE/devtools/phabricator/webroot/index.php:87]"

Instead, define `$xactions`.

Test Plan:
- Type into Conpherence while tailing the error log.
- After patch, clean error log.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D8323

+1 -3
+1 -3
src/applications/conpherence/controller/ConpherenceUpdateController.php
··· 37 37 $e_file = array(); 38 38 $errors = array(); 39 39 $delete_draft = false; 40 + $xactions = array(); 40 41 if ($request->isFormPost()) { 41 42 $editor = id(new ConpherenceEditor()) 42 43 ->setContinueOnNoEffect($request->isContinueRequest()) ··· 59 60 $delete_draft = true; 60 61 break; 61 62 case ConpherenceUpdateActions::ADD_PERSON: 62 - $xactions = array(); 63 63 $person_phids = $request->getArr('add_person'); 64 64 if (!empty($person_phids)) { 65 65 $xactions[] = id(new ConpherenceTransaction()) ··· 69 69 } 70 70 break; 71 71 case ConpherenceUpdateActions::REMOVE_PERSON: 72 - $xactions = array(); 73 72 if (!$request->isContinueRequest()) { 74 73 // do nothing; we'll display a confirmation dialogue instead 75 74 break; ··· 95 94 ->setContent($result); 96 95 break; 97 96 case ConpherenceUpdateActions::METADATA: 98 - $xactions = array(); 99 97 $updated = false; 100 98 // all metadata updates are continue requests 101 99 if (!$request->isContinueRequest()) {