Skip to content

set params::validate default value of plugin_dir to undef.#17

Open
omcnet wants to merge 1 commit into
rharrison10:masterfrom
omcnet:fix-plugin-dir-default-value
Open

set params::validate default value of plugin_dir to undef.#17
omcnet wants to merge 1 commit into
rharrison10:masterfrom
omcnet:fix-plugin-dir-default-value

Conversation

@omcnet
Copy link
Copy Markdown

@omcnet omcnet commented Jul 31, 2015

Without this patch the bacula class's default value of undef, will not be used, since undef does not overwrite a parameter.
Thus the params::validate default value for plugin_dir will be used, which is ''.
This causes the validation to fail since '' is not a valid and absolute path.
To fix this behaviour, the default value for plugin_dir within the params::validate class should also be undef, to work
with the != undef condition within the class.
The error will be triggered if a bacula class is created without setting the plugin_dir argument.

The resulting error message is:
valuation Error: Error while evaluating a Function Call, is not an absolute path.

Without this patch the bacula class's default value of undef, will not be used, since undef does not overwrite a parameter.
Thus the params::validate default value for plugin_dir will be used, which is ''.
This causes the validation to fail since '' is not a valid and absolute path.
To fix this behaviour, the default value for plugin_dir within the params::validate class should also be undef, to work
with the != undef condition within the class.
The error will be triggered if a bacula class is created without setting the plugin_dir argument.

The resulting error message is:
valuation Error: Error while evaluating a Function Call,  is not an absolute path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant