Page MenuHomePhabricator

D12903.id31035.diff
No OneTemporary

D12903.id31035.diff

diff --git a/resources/sql/autopatches/20150504.symbolsproject.1.php b/resources/sql/autopatches/20150504.symbolsproject.1.php
--- a/resources/sql/autopatches/20150504.symbolsproject.1.php
+++ b/resources/sql/autopatches/20150504.symbolsproject.1.php
@@ -38,7 +38,12 @@
idx($project_row, 'name', '???'));
$symbol_index_projects = $project_row['symbolIndexProjects'];
- $symbol_index_projects = phutil_json_decode($symbol_index_projects);
+ $symbol_index_projects = nonempty($symbol_index_projects, '[]');
+ try {
+ $symbol_index_projects = phutil_json_decode($symbol_index_projects);
+ } catch (PhutilJSONParserException $ex) {
+ continue;
+ }
$sources = $repo->getDetail('symbol-sources', array());
foreach ($symbol_index_projects as $index_project) {
@@ -50,7 +55,12 @@
$repo->setDetail('symbol-sources', $sources);
$languages = $project_row['symbolIndexLanguages'];
- $languages = phutil_json_decode($languages);
+ $languages = nonempty($languages, '[]');
+ try {
+ $languages = phutil_json_decode($languages);
+ } catch (PhutilJSONParserException $ex) {
+ continue;
+ }
$languages = array_merge(
$repo->getDetail('symbol-languages', array()),

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 26, 12:23 PM (3 w, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7703984
Default Alt Text
D12903.id31035.diff (1 KB)

Event Timeline