HomePhorge

Fix InvalidArgumentException on commit hook

Description

Fix InvalidArgumentException on commit hook

Summary:
Fix a regression introduced here:

96ae4ba13acbf0e2f8932e950a92af0495f034d7

I reproduced this exception executing "svn commit" on a hosted repository.

That crash happened because the PHP getenv() function can return false.
But, that is a very terrible value that blasts the non-string-empty check.

So, now the default getenv() value is skipped, without causing problems.

Closes T15253
Ref T15190

Test Plan: - I've run svn commit and I have not encountered any issue now

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15253, T15190

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

Details

Provenance
Valerio BozzolanAuthored on Apr 14 2023, 1:08 PM
themackabuPushed on Tue, Mar 25, 8:07 PM
Parents
rP1b9da964e970: Add setup check to avoid git version 2.5.0 and below (May 2015)
Branches
Unknown
Tags
Unknown

Event Timeline