Fix a CalendarExport issue when an existing export has an unsupported mode
ClosedPublic

Authored by epriestley on Feb 16 2017, 2:20 PM.

Details

Summary

See D16676. When an export has an unsupported mode (bad database value, out-of-date object, etc) the intent of this code is to put it into the <select /> so that you can save the form without silently changing the object.

However, it incorrectly calls array_shift() instead of array_unshift().

Test Plan

Edited a Calendar export with an invalid mode, saw the mode appear properly in the dropdown:

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
epriestley created this revision.Feb 16 2017, 2:20 PM
vrana accepted this revision.Feb 16 2017, 2:21 PM
This revision is now accepted and ready to land.Feb 16 2017, 2:21 PM
This revision was automatically updated to reflect the committed changes.