This commit is contained in:
Moon 2021-05-13 21:46:49 -07:00 committed by GitHub
parent e2d9a8792a
commit 8983a4d371
1 changed files with 6 additions and 4 deletions

View File

@ -72,10 +72,12 @@ class OptionRuleProcessor implements RuleProcessorInterface {
return false;
}
foreach ( $rule->transformers as $transform_args ) {
$transformer = TransformerService::create_transformer( $transform_args->use );
if ( ! $transformer->validate( $transform_args->arguments ) ) {
return false;
if ( isset( $rule->transformers ) && is_array( $rule->transformers ) ) {
foreach ( $rule->transformers as $transform_args ) {
$transformer = TransformerService::create_transformer( $transform_args->use );
if ( ! $transformer->validate( $transform_args->arguments ) ) {
return false;
}
}
}