Skip to content

Commit

Permalink
Porting #5258 - Issues upgrading thold
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 Apr 1, 2023
1 parent 7f1382f commit e0c60ad
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 @@ -59,6 +59,7 @@ Cacti CHANGELOG

1.2.25
-issue#5254: Created a data source template to specify the snmp port, but it doesn't seem to work properly
-issue#5258: Warnings occur when installing thold plugin and as such thold will not upgrade correctly
-issue#5275: Boost stats can display odd values when running
-issue#5277: Boost should not attempt to start if there are no poller_output_boost records
-issue#5279: Rebuild poller cache does not work as expected
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins.php
Expand Up @@ -1073,7 +1073,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 e0c60ad

Please sign in to comment.