@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 possible array to string conversion renaming Pholio Mockup image

Summary:
Premising that the `$old` and `$new` variables are 1-element arrays defined as PHID=>title,
this can cause `renderValue()` repeatedly fail when passing an array instead of its value.

Thus pass `head($old)` instead, to get the first value - that is the only one, even if you rename
multiple images (since this Transaction is about a single Mockup image).

Closes T15646

Test Plan:
* Have `phd` running
* Create a Pholio mockup with at least one image

Edit the Pholio mockup and:

1. rename the Titles of an image
2. rename a single Image
3. rename no image

No nuclear implosions. You still see a lovely Feed mentioning each rename.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15646

Differential Revision: https://we.phorge.it/D25441

+2 -2
+2 -2
src/applications/pholio/xaction/PholioImageNameTransaction.php
··· 31 31 '%s renamed an image (%s) from %s to %s.', 32 32 $this->renderAuthor(), 33 33 $this->renderHandle(key($new)), 34 - $this->renderValue($old), 35 - $this->renderValue($new)); 34 + $this->renderValue((string)head($old)), 35 + $this->renderValue((string)head($new))); 36 36 } 37 37 38 38 public function getTitleForFeed() {