Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15391432
D17576.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17576.id.diff
View Options
diff --git a/src/infrastructure/cluster/config/PhabricatorClusterSearchConfigOptionType.php b/src/infrastructure/cluster/config/PhabricatorClusterSearchConfigOptionType.php
--- a/src/infrastructure/cluster/config/PhabricatorClusterSearchConfigOptionType.php
+++ b/src/infrastructure/cluster/config/PhabricatorClusterSearchConfigOptionType.php
@@ -4,7 +4,7 @@
extends PhabricatorConfigJSONOptionType {
public function validateOption(PhabricatorConfigOption $option, $value) {
- self::validateClusterSearchConfigValue($value);
+ self::validateValue($value);
}
public static function validateValue($value) {
diff --git a/src/infrastructure/cluster/search/PhabricatorSearchService.php b/src/infrastructure/cluster/search/PhabricatorSearchService.php
--- a/src/infrastructure/cluster/search/PhabricatorSearchService.php
+++ b/src/infrastructure/cluster/search/PhabricatorSearchService.php
@@ -186,6 +186,18 @@
$refs = array();
foreach ($services as $config) {
+
+ // Normally, we've validated configuration before we get this far, but
+ // make sure we don't fatal if we end up here with a bogus configuration.
+ if (!isset($engines[$config['type']])) {
+ throw new Exception(
+ pht(
+ 'Configured search engine type "%s" is unknown. Valid engines '.
+ 'are: %s.',
+ $config['type'],
+ implode(', ', array_keys($engines))));
+ }
+
$engine = $engines[$config['type']];
$cluster = new self($engine);
$cluster->setConfig($config);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 9:50 AM (5 d, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706789
Default Alt Text
D17576.id.diff (1 KB)
Attached To
Mode
D17576: Soften a possible cluster search setup fatal
Attached
Detach File
Event Timeline
Log In to Comment