Skip to content

Commit

Permalink
Fix error in known-plugins.json and prevent error from causing fatal …
Browse files Browse the repository at this point in the history
…in the future
  • Loading branch information
jdevalk committed Apr 27, 2024
1 parent d2325ac commit 35299dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion known-plugins/known-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"option_prefixes": ["wpvivid_"]
},
"revslider": {
"revslider": "Slider Revolution",
"name": "Slider Revolution",
"option_prefixes": ["revslider-"]
},
"wp-rocket": {
Expand Down
4 changes: 3 additions & 1 deletion src/class-map-plugin-to-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public function get_plugin_name( string $option ): string {
foreach ( $this->plugins_list as $plugin ) {
foreach ( $plugin['option_prefixes'] as $prefix ) {
if ( strpos( $option, $prefix ) === 0 ) {
return $plugin['name'];
if ( isset( $plugin['name'] ) ) {
return $plugin['name'];
}
}
}
}
Expand Down

0 comments on commit 35299dd

Please sign in to comment.