Summary: | plugins-upload.pl causes uninitialized value noise | ||
---|---|---|---|
Product: | Koha | Reporter: | Lee Jamison <ldjamison> |
Component: | Tools | Assignee: | Lee Jamison <ldjamison> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, mtj, mtompset |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Test Plugin KPZ
Bug 19088: plugins-upload causes error log noise Bug 19088: plugins-upload causes error log noise Bug 19088: plugins-upload causes error log noise |
Description
Lee Jamison
2017-08-11 13:36:29 UTC
Created attachment 65926 [details]
Test Plugin KPZ
Test plugin KPZ file to use to test this bug
Created attachment 65928 [details] [review] Bug 19088: plugins-upload causes error log noise After uploading a plugin the error log indicates use of uninitialized value in $op. This patch silences the noise. To test: 1) Set <enable_plugins> to 1 (one) in koha-conf.xml. 2) Set the UseKohaPlugins system preference to 'Enable'. 3) Navigate to Administration -> Manage plugins. 4) Install the test plugin KPZ file attached to this bug. 5) Notice the uninitialized value noise in the error log. 6) Uninstall the plugin (plack restart may be required if plack is enabled). 7) Apply patch. 8) Install the plugin again. 9) Notice no noise in the error log. 10) Run qa tools. 11) Run prove t/db_dependent/Plugins.t Comment on attachment 65928 [details] [review] Bug 19088: plugins-upload causes error log noise Review of attachment 65928 [details] [review]: ----------------------------------------------------------------- ::: plugins/plugins-upload.pl @@ +47,4 @@ > > my $uploadfilename = $input->param('uploadfile'); > my $uploadfile = $input->upload('uploadfile'); > +my $op = $input->param('op') || q{}; // is better. if 'op' is '0', then this would set $op to ''. || evaluates truthy only. // is a defined check. http://perldoc.perl.org/perlop.html#Logical-Defined-Or Don't even need the plugin. Using the breadcrumbs to go back you can trigger the error over and over. :) Created attachment 65936 [details] [review] Bug 19088: plugins-upload causes error log noise After uploading a plugin the error log indicates use of uninitialized value in $op. This patch silences the noise. To test: 1) Set <enable_plugins> to 1 (one) in koha-conf.xml. 2) Set the UseKohaPlugins system preference to 'Enable'. 3) Navigate to Administration -> Manage plugins. 4) Install the test plugin KPZ file attached to this bug. 5) Notice the uninitialized value noise in the error log. 6) Uninstall the plugin (plack restart may be required if plack is enabled). 7) Apply patch. 8) Install the plugin again. 9) Notice no noise in the error log. 10) Run qa tools. 11) Run prove t/db_dependent/Plugins.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> In an old school git install, it still triggers noise, just in a different log. Leave it up to the tester to know which log it should be in. Created attachment 66564 [details] [review] Bug 19088: plugins-upload causes error log noise After uploading a plugin the error log indicates use of uninitialized value in $op. This patch silences the noise. To test: 1) Set <enable_plugins> to 1 (one) in koha-conf.xml. 2) Set the UseKohaPlugins system preference to 'Enable'. 3) Navigate to Administration -> Manage plugins. 4) Install the test plugin KPZ file attached to this bug. 5) Notice the uninitialized value noise in the error log. 6) Uninstall the plugin (plack restart may be required if plack is enabled). 7) Apply patch. 8) Install the plugin again. 9) Notice no noise in the error log. 10) Run qa tools. 11) Run prove t/db_dependent/Plugins.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x, will be in 17.05.05. This patch has been pushed to 16.11.x and will be in 16.11.13. Pushed to 16.05.x, for 16.05.18 release |