1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Fix PHP 8.1 trim(null) exception in ./bin/diviner generate

Summary:
When running './bin/diviner generate' under PHP 8.1, we get a trim(null) exception.

Fixes T15548

Test Plan: Run './bin/diviner generate'

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15548

Differential Revision: https://we.phorge.it/D25353
This commit is contained in:
Steve Campbell 2023-08-11 10:37:15 +01:00 committed by sten
parent eb2be08f9f
commit 9c8b9a6bbf

View file

@ -346,7 +346,7 @@ final class DivinerAtom extends Phobject {
->setContext(idx($dictionary, 'context')) ->setContext(idx($dictionary, 'context'))
->setLanguage(idx($dictionary, 'language')) ->setLanguage(idx($dictionary, 'language'))
->setParentHash(idx($dictionary, 'parentHash')) ->setParentHash(idx($dictionary, 'parentHash'))
->setDocblockRaw(idx($dictionary, 'docblockRaw')) ->setDocblockRaw(coalesce(idx($dictionary, 'docblockRaw'), ''))
->setProperties(idx($dictionary, 'properties')); ->setProperties(idx($dictionary, 'properties'));
foreach (idx($dictionary, 'warnings', array()) as $warning) { foreach (idx($dictionary, 'warnings', array()) as $warning) {