Skip to content

Commit

Permalink
Fixing #5258 - Warnings on upgrading/installing some plugins
Browse files Browse the repository at this point in the history
Warnings occur when installing thold plugin and as such thold will not upgrade correctly
  • Loading branch information
TheWitness committed Mar 19, 2023
1 parent 08f2bcb commit 2626df9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,7 @@ Cacti CHANGELOG

1.2.25
-issue#5255: Data query xml path with space problem
-issue#5258: Warnings occur when installing thold plugin and as such thold will not upgrade correctly
-issue#5259: When the Data Template contains more Data Sources than the Graph Template RRDfiles won't update
-issue#5263: Warnings in Cacti log when re-indexing devices
-issue#5272: Boost continues to loose data when archive tables are missed due to overloaded MariaDB
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins.php
Expand Up @@ -1056,7 +1056,7 @@ function api_plugin_valid_entrypoint($plugin, $function) {
// Check for invalid entrypoint install/upgrade
$backtrace = debug_backtrace();
if (cacti_sizeof($backtrace)) {
if (!preg_match('/(install|upgrade)/i', $backtrace[2]['function'])) {
if (!preg_match('/(install|upgrade|setup)/i', $backtrace[2]['function'])) {
cacti_log(sprintf('WARNING: Plugin \'%s\' is attempting to call \'%s\' improperly in function \'%s\'', $plugin, $function, $backtrace[2]['function']), false, 'PLUGIN');
return false;
}
Expand Down

0 comments on commit 2626df9

Please sign in to comment.