Page MenuHomePhorge

Fix InvalidArgumentException on commit hook
AbandonedPublic

Authored by valerio.bozzolan on Apr 14 2023, 12:03.
Tags
None
Referenced Files
F4068602: D25121.1746804670.diff
Thu, May 8, 15:31
F4045909: D25121.1746736847.diff
Wed, May 7, 20:40
F4034020: D25121.1746717060.diff
Wed, May 7, 15:11
F4034018: D25121.1746717059.diff
Wed, May 7, 15:10
F3928419: D25121.1746403381.diff
Sun, May 4, 00:03
F3927740: D25121.1746394149.diff
Sat, May 3, 21:29
F3850647: D25121.1746115671.diff
Wed, Apr 30, 16:07
F3850646: D25121.1746115670.diff
Wed, Apr 30, 16:07

Details

Reviewers
None
Group Reviewers
O1: Blessed Committers
Summary

Fix a regression introduced here:

96ae4ba13acbf0e2f8932e950a92af0495f034d7

I reproduced this exception while using Subversion 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.

We know. Ideally, that check should just says "hey, nope, this is not a
non-empty string" - but - at the moment that check explodes so violently
for non-strings.

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

Test Plan
  • run one simple svn commit

Diff Detail

Repository
rP Phorge
Branch
fix-git-commit-hook
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningscripts/repository/commit_hook.php:194TXT3Line Too Long
Unit
No Test Coverage
Build Status
Buildable 245
Build 245: arc lint + arc unit