HomePhorge

Fix possible array to string conversion renaming Pholio Mockup image

Description

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

Details

Provenance
Andre KlapperAuthored on Nov 16 2023, 1:41 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP775d141fe6bf: Audit Feed: less verbose when the author is the committer
Branches
Unknown
Tags
Unknown

Event Timeline