1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-24 12:39:04 +01:00
phorge-phorge/src
epriestley c96d52caa3 (stable) Fix an issue where "Export Data" could fail if a user had a nonempty custom policy preference
Summary:
The "Export Data" workflow incorrectly uses the "Policy Favorites" setting to choose a default export format. This is just a copy/paste error; the correct setting exists and is unused.

If the setting value is an array (as the "Policy Favorites" value often is), we try to use it as an array index. This generates a runtime exception after D21044.

```
[2020-06-16 06:32:12] EXCEPTION: (RuntimeException) Illegal offset type in isset or empty at [<arcanist>/src/error/PhutilErrorHandler.php:263]
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/search/controller/PhabricatorApplicationSearchController.php:460]
```

  - Use the correct setting.
  - Make sure the value we read is a string.

Test Plan:
  - Used "Export Data" with a nonempty, array-valued "Policy Favorites" setting.
    - Before: runtime exception.
    - After: clean export.
  - Used "Export Data" again, saw my selection from the first time persisted.

Differential Revision: https://secure.phabricator.com/D21361
2020-06-16 06:44:35 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront (stable) When proxying HTTP repository responses from repository nodes, discard content description headers 2020-04-25 07:54:47 -07:00
applications (stable) Fix an issue where "Export Data" could fail if a user had a nonempty custom policy preference 2020-06-16 06:44:35 -07:00
docs Add "short name", "id", and "phid" variables for external editor URIs 2020-04-19 09:37:53 -07:00
extensions
infrastructure (stable) Promote 2020 Week 20 2020-05-22 14:22:53 -07:00
view Add "View Raw Remarkup" to inline comments 2020-05-13 17:14:20 -07:00
__phutil_library_init__.php
__phutil_library_map__.php Roughly support inline comment suggestions 2020-05-20 14:26:37 -07:00