Koha-clms/plugins
Tomas Cohen Arazi 710c9039ee Bug 26751: Fix fatal exception if only one repo defined
This patch fixes this nasty problem with how XML is parsed: if more than
one entry is found, repo => [] is generated. If only one, repo => {}.

To test:
1. Have more than one entries in the plugins_repo entry:

<plugin_repos>
    <repo>
        <name>ByWater Solutions</name>
        <org_name>bywatersolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>Theke Solutions</name>
        <org_name>thekesolutions</org_name>
        <service>github</service>
    </repo>
    <repo>
        <name>PTFS Europe</name>
        <org_name>ptfs-europe</org_name>
        <service>github</service>
    </repo>
 </plugin_repos>

2. Search for plugins
=> SUCCESS: Searching works!
3. Leave only one entry
4. Restart all to refresh things
5. Try searching for plugins
=> FAIL: Fatal error
6. Apply this patch
7. Repeat 5
=> SUCCESS: It doesn't explode anymore!
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9e5ea4f5ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2020-11-13 18:16:20 +00:00
..
plugins-enable.pl Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
plugins-home.pl Bug 26751: Fix fatal exception if only one repo defined 2020-11-13 18:16:20 +00:00
plugins-uninstall.pl Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
plugins-upload.pl Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
run.pl Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00