File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
plugins/performance-lab/includes/admin Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,17 @@ function perflab_query_plugin_info( string $plugin_slug ) {
81
81
while ( count ( $ plugin_queue ) > 0 ) { // phpcs:ignore Squiz.PHP.DisallowSizeFunctionsInLoops.Found
82
82
$ current_plugin_slug = array_shift ( $ plugin_queue );
83
83
84
- if ( isset ( $ plugins [ $ current_plugin_slug ] ) || ! isset ( $ all_performance_plugins [ $ current_plugin_slug ] ) ) {
84
+ if ( isset ( $ plugins [ $ current_plugin_slug ] ) ) {
85
85
continue ;
86
86
}
87
87
88
+ if ( ! isset ( $ all_performance_plugins [ $ current_plugin_slug ] ) ) {
89
+ return new WP_Error (
90
+ 'plugin_not_found ' ,
91
+ __ ( 'Plugin not found in Performance Lab \'s features / plugins. ' , 'performance-lab ' )
92
+ );
93
+ }
94
+
88
95
$ plugin_data = $ all_performance_plugins [ $ current_plugin_slug ];
89
96
$ plugins [ $ current_plugin_slug ] = wp_array_slice_assoc ( $ plugin_data , $ fields );
90
97
You can’t perform that action at this time.
0 commit comments