Merged in MAW-865-auto-patch (pull request #27)

Plugin updates

* Plugin updates

search-filter-divi,woocommerce,wordpress-seo,search-filter-pro
This commit is contained in:
Tony Volpe
2024-01-29 21:56:40 +00:00
parent e6c5e5099c
commit 9169f08384
3452 changed files with 1327 additions and 224370 deletions

View File

@@ -41,8 +41,13 @@ class Init {
}
foreach ( $specs as $spec ) {
$suggestion = EvaluateSuggestion::evaluate( $spec );
$suggestions[] = $suggestion;
try {
$suggestion = EvaluateSuggestion::evaluate( $spec );
$suggestions[] = $suggestion;
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
} catch ( \Throwable $e ) {
// Ignore errors.
}
}
return array_values(

View File

@@ -36,24 +36,36 @@ class ComparisonOperation {
if ( is_array( $left_operand ) && is_string( $right_operand ) ) {
return in_array( $right_operand, $left_operand, true );
}
return strpos( $right_operand, $left_operand ) !== false;
if ( is_string( $right_operand ) && is_string( $left_operand ) ) {
return strpos( $right_operand, $left_operand ) !== false;
}
break;
case '!contains':
if ( is_array( $left_operand ) && is_string( $right_operand ) ) {
return ! in_array( $right_operand, $left_operand, true );
}
return strpos( $right_operand, $left_operand ) === false;
if ( is_string( $right_operand ) && is_string( $left_operand ) ) {
return strpos( $right_operand, $left_operand ) === false;
}
break;
case 'in':
if ( is_array( $right_operand ) && is_string( $left_operand ) ) {
return in_array( $left_operand, $right_operand, true );
}
return strpos( $left_operand, $right_operand ) !== false;
if ( is_string( $left_operand ) && is_string( $right_operand ) ) {
return strpos( $left_operand, $right_operand ) !== false;
}
break;
case '!in':
if ( is_array( $right_operand ) && is_string( $left_operand ) ) {
return ! in_array( $left_operand, $right_operand, true );
}
return strpos( $left_operand, $right_operand ) === false;
if ( is_string( $left_operand ) && is_string( $right_operand ) ) {
return strpos( $left_operand, $right_operand ) === false;
}
break;
}
return false;
}
}
}

View File

@@ -37,12 +37,16 @@ class SpecRunner {
// Evaluate the spec and get the new note status.
$previous_status = $note->get_status();
$status = EvaluateAndGetStatus::evaluate(
$spec,
$previous_status,
$stored_state,
new RuleEvaluator()
);
try {
$status = EvaluateAndGetStatus::evaluate(
$spec,
$previous_status,
$stored_state,
new RuleEvaluator()
);
} catch ( \Throwable $e ) {
return;
}
// If the status is changing, update the created date to now.
if ( $previous_status !== $status ) {