Skip to content

Commit

Permalink
fix: Add empty check for schema error reporting config (BDS-369)
Browse files Browse the repository at this point in the history
Without this check, if the schemaErrorReporting config is not set,
you'll get a fatal error when trying to build:

"Undefined index: schemaErrorReporting
  • Loading branch information
remydenton committed Jun 28, 2018
1 parent b743b7e commit 487899b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 321c938..7ac9694 100644
*/
public static function validateDataSchema(\Twig_Environment $env, $data, $schema, $twig_self) {
$output = '';
+ $error_reporting = $data['bolt']['data']['config']['schemaErrorReporting'];
+ $error_reporting = !empty($data['bolt']['data']['config']['schemaErrorReporting']) ? $data['bolt']['data']['config']['schemaErrorReporting'] : '';
+
+ // Error reporting is turned off, so don't bother continuing with validation.
+ if ($error_reporting == 'none') {
Expand Down

0 comments on commit 487899b

Please sign in to comment.