mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
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
This commit is contained in:
parent
775d141fe6
commit
f42dd5819e
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ final class PholioImageNameTransaction
|
||||||
'%s renamed an image (%s) from %s to %s.',
|
'%s renamed an image (%s) from %s to %s.',
|
||||||
$this->renderAuthor(),
|
$this->renderAuthor(),
|
||||||
$this->renderHandle(key($new)),
|
$this->renderHandle(key($new)),
|
||||||
$this->renderValue($old),
|
$this->renderValue((string)head($old)),
|
||||||
$this->renderValue($new));
|
$this->renderValue((string)head($new)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitleForFeed() {
|
public function getTitleForFeed() {
|
||||||
|
|
Loading…
Reference in a new issue