Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Mar 23, 2023
2 parents 09966c9 + 802a608 commit e3daac8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This release drops the support for older versions of ElasticPress and PHP.

### Added
- Instructions with error code for failed queries. Props [@MARQAS](https://github.com/MARQAS) and [@felipeelia](https://github.com/felipeelia) via [#58](https://github.com/10up/debug-bar-elasticpress/pull/58).
- Buttons to copy or download all requests info. Props [@MARQAS](https://github.com/MARQAS), [@felipeelia](https://github.com/felipeelia), and [@burhandodhy](https://github.com/burhandodhy) via [#63](https://github.com/10up/debug-bar-elasticpress/pull/63).
- Buttons to copy or download all requests info. Props [@MARQAS](https://github.com/MARQAS), [@felipeelia](https://github.com/felipeelia), and [@burhandodhy](https://github.com/burhandodhy) via [#63](https://github.com/10up/debug-bar-elasticpress/pull/63) and [#74](https://github.com/10up/ElasticPress/pull/74).
- Compatibility with the WordPress localization system. Props [@burhandodhy](https://github.com/burhandodhy) and [@felipeelia](https://github.com/felipeelia) via [#73](https://github.com/10up/debug-bar-elasticpress/pull/73).
- SECURITY.md file. Props [@felipeelia](https://github.com/felipeelia) via [#56](https://github.com/10up/debug-bar-elasticpress/pull/56).

Expand Down
13 changes: 7 additions & 6 deletions classes/QueryFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ public function format_queries_for_display( $queries ) : array {
$query = $this->format_log_entry( $query, 'query' );
list( $error, $solution ) = $failed_queries_obj->analyze_log( $query );

$fields = [
'error' => [
$fields = [];
if ( ! empty( $error ) ) {
$fields['error'] = [
'label' => __( 'Error', 'debug-bar-elasticpress' ),
'value' => $error,
],
'recommended_solution' => [
];
$fields['recommended_solution'] = [
'label' => __( 'Recommended Solution', 'debug-bar-elasticpress' ),
'value' => $solution,
],
];
];
}

foreach ( $query as $field => $value ) {
// Already outputted in the title
Expand Down

0 comments on commit e3daac8

Please sign in to comment.