@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.

Pholio mock image description: remove nonsense 'shouldHide()'

Summary:
Remove the nonsense method 'shouldHide()' because it always returns
false, which is the same desired value from the parent class.

In fact, the old value is always something like this:

array( 'PHID-PIMG-xegbj5j4fjnmp7xzakk3' => '' )

Or this:

array( 'PHID-PIMG-xegbj5j4fjnmp7xzakk3' => 'asd' )

So it's never this:

counterexample
array( null => null )

(Which - by the way, is always internally converted by PHP to this...)

array( '' => null )

Plus, the class 'PholioImageDescriptionTransaction' should be like
the class 'ManiphestTaskDescriptionTransaction', so, both without
this method 'shouldHide()'.

The 'shouldHide()' here was also broken in PHP 8.5.

Thanks to Aklapper for the initial troubleshooting.

Closes T16479
Ref T16460

Test Plan:
These feeds absolutely do not change A/B:

- create a Pholio mock with an image with a description and save
- remove that image description and save
- re-add a image description and save

Reviewers: aklapper, O1 Blessed Committers

Reviewed By: aklapper, O1 Blessed Committers

Subscribers: tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16479, T16460

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

-5
-5
src/applications/pholio/xaction/PholioImageDescriptionTransaction.php
··· 55 55 return null; 56 56 } 57 57 58 - public function shouldHide() { 59 - $old = $this->getOldValue(); 60 - return ($old === array(null => null)); 61 - } 62 - 63 58 public function hasChangeDetailView() { 64 59 return true; 65 60 }