Homec4science

Fix array_mergev() semantics when passed an empty array

Authored by epriestley <git@epriestley.com> on Feb 22 2012, 06:24.

Description

Fix array_mergev() semantics when passed an empty array

Summary:

  • If you view "active revisions" and have some revisions in one panel but no

revisions in the other panel, we'll generate a call to array_mergev(array()),
which returns null instead of array().

  • This cascades into a handle lookup failure because other arrays along the

way get nulled out.

  • We should probably have more strict parameter checking in array_mergev(),

but this did emit piles of warnings already, it was just a nonobvious repro (one
panel with diffs, one without).

Test Plan: Looked at a panel-with-diffs + panel-without, no exception, no
errors. Ran unit test.

Reviewers: nh, btrahan

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1664

Details

Committed
epriestley <git@epriestley.com>Feb 22 2012, 06:24
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUb787dce1d902: Improve CA bundle handling for libphutil / HTTPSFuture
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUc90fb32461c9: Fix array_mergev() semantics when passed an empty array (authored by epriestley <git@epriestley.com>).Feb 22 2012, 06:24